On Thu, Dec 25, 2014 at 4:40 AM, 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. > May I recommend to only target class and class-like names for an initial RFC? Those have the strongest argument in favor of case-sensitivity given how current autoloader implementations work - essentially the case-insensitivity doesn't properly work anyway in modern code. Constants in particular are more problematic, because they are currently only partially case-sensitive and there are some constants (namely true, false and null) where case sensitivity must not be enforced. So if you want to make constants fully case sensitive those three would have to become reserved keywords. So, I think this has more chances if you tackle one issue at a time. I'd also appreciate having a voting option for removing case-insensitivity right away, as opposed to throwing E_STRICT/E_DEPRECATED. If we want to change this, I personally would rather drop it right away than start throwing E_STRICT warnings that would make the case-insensitive usage impossible anyway. Nikita