Re: Proposal for PHP 7 : case-sensitive symbols

From: Date: Sat, 20 Dec 2014 23:32:17 +0000
Subject: Re: Proposal for PHP 7 : case-sensitive symbols
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-79830@lists.php.net to get a copy of this message
On 12/20/2014 05:16 PM, Paul Dragoonis wrote: > It's too big of a BC change firstly. > > Secondly it has no language benefit or developer benefit. Are you sure? Autoloading schemes such as PSR-4 derive pathnames from class names without converting them to lowercase. If case mismatches go undetected and unreported, a project might work on a developer's Windows desktop (case-insensitive) yet not when uploaded to a Linux web server (case-sensitive). Or when an object instantiation or a static method call using the correct case is removed from the code, a later call using the incorrect case might break. Backward compatibility is perhaps a good reason to not make this change. However, I would like to see at least an option to report case mismatches in class names as E_STRICT errors and possibly a way to disable that for specific files or classes when necessary. > On 20 Dec 2014 22:01, "F & N Laupretre" <nf.laupretre@yahoo.fr> wrote: >> I would like to propose that namespaces, functions, and classes become >> case-sensitive (constants are already case-sensitive). Actually, I never >> understood why they are case-insensitive. Even if the performance gain is >> negligible, I think it could be the right time to question this.

« previous php.internals (#79830) next »