Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

This is only part of a thread. view whole thread
  100561
September 13, 2017 14:06 rowan.collins@gmail.com (Rowan Collins)
On 13 September 2017 14:15:43 BST, Ryan Pallas <derokorian@gmail.com> wrote:
>I must be missing something, there is no autoloader shipped with PHP.
Just to be pedantically correct, there actually is an implementation shipped, see http://php.net/spl_autoload It's even the default if you don't pass your own function to spl_autoload_register. Nonetheless, you are quite right that Tony's complaint is nonsensical, because he could implement whatever autoloader suited his directory structure, if he wanted to - even a case insensitive one. It is true that autoloading isn't mandatory, but it's also a complete straw man, because Sara already made the same point herself:
> I don't feel as though that's true of ... > projects where autoloaders > aren't used (not a small number).
Regards, -- Rowan Collins [IMSoP]
  100563
September 13, 2017 15:50 derokorian@gmail.com (Ryan Pallas)
On Wed, Sep 13, 2017 at 8:06 AM, Rowan Collins collins@gmail.com>
wrote:

> On 13 September 2017 14:15:43 BST, Ryan Pallas <derokorian@gmail.com> > wrote: > >I must be missing something, there is no autoloader shipped with PHP. > > Just to be pedantically correct, there actually is an implementation > shipped, see http://php.net/spl_autoload It's even the default if you > don't pass your own function to spl_autoload_register. >
Almost 2 decades in PHP, and still so much I don't know haha. I will point out though, that according to a comment [1] it does not replace the underscores with slashes as mentioned, and I see no where in the code [2] that it does either. [1] http://php.net/manual/en/function.spl-autoload.php#98762 [2] https://github.com/php/php-src/blob/master/ext/spl/php_spl.c#L306
> > Nonetheless, you are quite right that Tony's complaint is nonsensical, > because he could implement whatever autoloader suited his directory > structure, if he wanted to - even a case insensitive one. > > It is true that autoloading isn't mandatory, but it's also a complete > straw man, because Sara already made the same point herself: > > > I don't feel as though that's true of ... > > projects where autoloaders > > aren't used (not a small number). > > Regards, > > -- > Rowan Collins > [IMSoP] >