Skip to content

Cleanup SPL autoload implementation#5696

Closed
nikic wants to merge 2 commits into
php:masterfrom
nikic:autoload-cleanup
Closed

Cleanup SPL autoload implementation#5696
nikic wants to merge 2 commits into
php:masterfrom
nikic:autoload-cleanup

Conversation

@nikic

@nikic nikic commented Jun 9, 2020

Copy link
Copy Markdown
Member

This removes one level of indirection from the autoloading implementation. Instead of calling spl_autoload_call(), which then calls the registered autoloaders, we introduce a direct zend_autoload hook.

Additionally, we simplify handling by dropping special-casing of spl_autoload, and instead registering the default autoloader just like any other one.

This also fixes https://bugs.php.net/bug.php?id=71236 as a side-effect.

@staabm

staabm commented Jun 9, 2020

Copy link
Copy Markdown
Contributor

Does this manifest in perf improvements regarding autoloading?

@nikic

nikic commented Jun 9, 2020

Copy link
Copy Markdown
Member Author

@staabm Yes, this should slightly improve performance.

@php-pulls php-pulls closed this in 5b59d49 Jun 10, 2020
@carusogabriel carusogabriel added this to the PHP 8.0 milestone Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants