Re: Deprecate and remove case-insensitive constants?
| From: | Tony Marston | Date: | Wed, 13 Sep 2017 16:12:56 +0000 |
| Subject: | Re: Deprecate and remove case-insensitive constants? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100565@lists.php.net to get a copy of this message | ||
"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: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.orgI 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/rQRrXzCaYou 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.