Skip to content

Cleanup SPL autoload implementation #5696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

nikic
Copy link
Member

@nikic nikic commented Jun 9, 2020

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
Copy link
Contributor

staabm commented Jun 9, 2020

Does this manifest in perf improvements regarding autoloading?

@nikic
Copy link
Member Author

nikic commented Jun 9, 2020

@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