Skip to content

ext/spl: ignore leading namespace separator in spl_autoload()#22323

Open
jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix/spl-autoload-leading-backslash
Open

ext/spl: ignore leading namespace separator in spl_autoload()#22323
jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix/spl-autoload-leading-backslash

Conversation

@jorgsowa

@jorgsowa jorgsowa commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Extracted from #22260

Strip a leading "\" before lowercasing, mirroring zend_lookup_class_ex(), so both spellings resolve identically.

Closes #22322

Strip a leading "\\" before lowercasing, mirroring zend_lookup_class_ex(),
so both spellings resolve identically.
@jorgsowa jorgsowa requested a review from Girgias as a code owner June 15, 2026 21:25
@jorgsowa jorgsowa changed the base branch from master to PHP-8.4 June 15, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spl_autoload() fails to load class with leading \

1 participant