Hi François, On Thu, Dec 25, 2014 at 2:40 PM, François Laupretre <franc...@tekwire.net> wrote: >> > De : Pierre Joye [mailto:pierre....@gmail.com] >> >> > Anyone dying while waiting to see PHP having case sensitive symbols >> > handling should go ahead with a RFC. > > For those interested, I just created a PR to raise an E_STRICT message on > class and function/method case mismatch : > > https://github.com/php/php-src/pull/965 > > It is not complete yet, as some cases are not trapped, especially for > functions, and the corresponding tests are missing. I'll try to write the RFC > (to propose the feature for PHP7) and finish the patch this week. Checking > constants is more complex than expected as the namespace part is converted to > lowercase during the compile phase. This RFC will deal with classes and > functions (including class methods) only. > >> He will also have to deal with >> file ops while being at it. Should they remain case insensitive? Do >> manual checks to match the path actually being requested (ie. possible >> on windows using meta info), or keep everything the way it is now? > > Do you mean simulating case-sensitive paths on case-insensitive file systems > ? Why not, depending on the overhead it brings. Unfortunately, I don't have > the Windows skills required to work on the subject. > > About the overhead the check introduces, note that it is supposed to be > temporary. The final goal is to store symbols as-Is, eliminating the need for > lowercase conversions. This would remove a lot of allocations and calls to > zend_str_tolower_copy(). This would also remove a lot of code. >
Thanks for putting the RFC together. Let sort that out once and for all :) I am definitively not in favor of case sensitivity. However it is still a good thing to have that RFC as this topic keeps pop up once in a while. About the patch: It has to take care about how userland codes (autoloader) will deal with case insensitive file systems. Will they have to take care of it themselves? Or will we keep them the way it is now? You can't simulate case sensitive paths on case insensitive file systems. Some ops may work, but PHP's IO have to be changed too if we do that, and this is totally going too far for my taste :) Cheers, -- Pierre @pierrejoye | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php