Hi, I started the RFC because I first wanted to test the idea on the list and have a place to store every case-insensitive I could find in PHP.
I stopped for several reasons : 1. The reactions were mostly negative, with a majority of 'breaks much, brings nothing' opinions, 2. Crawling through the code, I discovered that code to handle case insensitivity was spread all around PHP. Example: I thought that function and method names could be made case-sensitive by modifying a limited number of lines of code. Actually, it seems it is handled in a more or less redundant way in a lot of locations. So, I quickly realized that implementation would be extremely complex. 3. A lot of PHP code is, knowingly or not, using PHP case insensitivity. 4. A patch to make PHP case sensitive would be very complex, and providing a two-mode mechanism still much more. It would require in many cases to provide another case-sensitive test after each case-insensitive one and raise an error if both don't match. We must do that because case-insensitive comparisons are done using a case-sensitive comparison of two strings previously converted to lowercase. It would also require to store every class/function/method names twice, as they are currently stored in lowercase form. As lowercase names are transmitted as strings around the code, it is very complex to keep the link with the original value. So, to summarize, I now consider that providing a compatibility 'notice-only' mode is practically impossible. So, while it seemed attractive at first, I stopped working on it. I'll maybe revive it one day or another but, at the moment, it is not worth the pain working on a very complex change that would have almost no chance to pass. Regards François > -----Message d'origine----- > De : Alain Williams [mailto:a...@phcomp.co.uk] > Envoyé : mardi 24 février 2015 10:32 > À : internals@lists.php.net > Objet : Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine > > On Tue, Feb 24, 2015 at 06:23:04PM +0900, Yasuo Ohgaki wrote: > > > INI switch is better. Compiler switch would not work well, since user cannot > > check their code easily. > > > > PHP7 - introduce case sensitivity switch off by default > > PHP8 - make case sensitivity switch on by default > > PHP9 - remove case sensitivity switch > > +1 > > There will be those who just won't make changes and for who PHP9 will be a > ''surprise'' - but similar happened with the removal of register globals. > > -- > Alain Williams > Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, > IT Lecturer. > +44 (0) 787 668 0256 http://www.phcomp.co.uk/ > Parliament Hill Computers Ltd. Registration Information: > http://www.phcomp.co.uk/contact.php > #include <std_disclaimer.h> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php