Re: [PHP-DEV] [RFC] Function Autoloading (mark 5)

[email protected] ("Paul M. Jones") Tue, 7 Jul 2026 11:45:25 -0500
Newsgroups php.internals
Message-ID <[email protected]>
Hi all,

I have updated the RFC and PR to add the `strict_namespace=1` directive as a way of solving for the global-fallback shadow-function case.

I have also added some research on how prevalent that case actually is; it turns out to be extremely rare among the top 1000 Packagist packages:

> In the end, it looks like there are only 2 packages and 8 call sites that would behave unexpectedly if they converted to function autoloading and dropped their include calls. Either a use function import or declare(strict_namespace=1) would fix each one.

I have not yet added the "motivation" section, as indicated by earlier comments, but still plan on doing so.

Please review again as convenient!


-- pmj