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

This is only part of a thread. view whole thread
  100565
September 13, 2017 16:12 TonyMarston@hotmail.com ("Tony Marston")
"Ryan Pallas"  wrote in message 
news:CAObuZdtmhxQ285hwMc3x9TH2rj9D7Ty3vnhNPcBzdCePpch9YA@mail.gmail.com...
> >On Wed, Sep 13, 2017 at 2:59 AM, Tony Marston <TonyMarston@hotmail.com> >wrote: > >> >>> >> You seem to forget that autoloading is an option, not a requirement. I >> don't use autoloading in my 14 year old framework for several reasons: >> - An autoloader did not exist when I created my framework. >> - I built an alternative mechanism into my framework, so I don't need an >> autoloader. >> - I don't like the way autoloaders work - all my class names are in snake >> case (lowercase with underscore separators) and the autoloader converts >> '_' >> into '/' thus producing a file path which does not exist. >> > >I must be missing something, there is no autoloader shipped with PHP. You >have to define your own and register it. You can choose to change _ into / >within your autoloader, but that is entirely preference and not >specifically part of autoloading. For example, here's my autoloader which >does no such symbol replacement https://pastebin.com/rQRrXzCa > >
Then it must have been the project I was working on which used a combination of Codeigniter, Composer and PHPUnit. There was definitely something which translated a class name from "foo_bar_snafu" into "foo/bar/snafu". It's no wonder that I stopped using it. -- Tony Marston http://www.tonymarston.net http://www.radicore.org