Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

This is only part of a thread. view whole thread
  100539
September 12, 2017 13:04 cmbecker69@gmx.de ("Christoph M. Becker")
On 12.09.2017 at 14:52, François Laupretre wrote:

> What about making PHP 8 100% case-sensitive (except true/false) ? If we > announce it years in advance, it is possible, IMO.
I don't think we can do that. Consider, for instance, ext/gd where all functions are actually in lower case, but I've seen a lot of code written in pascal or camel case to make the functions better readable, e.g. imageCreateFromJpeg() vs. imagecreatefromjpeg() -- Christoph M. Becker
  100540
September 12, 2017 14:04 danack@basereality.com (Dan Ackroyd)
On 12 September 2017 at 14:04, Christoph M. Becker <cmbecker69@gmx.de> wrote:
> > I don't think we can do that. Consider, for instance, ext/gd where all > functions are actually in lower case, but I've seen a lot of code > written in pascal or camel case to make the functions better readable, e.g. > > imageCreateFromJpeg() vs. imagecreatefromjpeg()
It's pretty easy to imagine that if we had function autoloading, creating an optional small backwards compatibility shim/library to work around that problem would be pretty easy. It's also the type of error that would be easy to add a deprecation warning to in a late 7.x branch. cheers Dan
  100657
September 16, 2017 03:22 yohgaki@ohgaki.net (Yasuo Ohgaki)
Hi Christoph,

On Tue, Sep 12, 2017 at 10:04 PM, Christoph M. Becker <cmbecker69@gmx.de>
wrote:

> On 12.09.2017 at 14:52, François Laupretre wrote: > > > What about making PHP 8 100% case-sensitive (except true/false) ? If we > > announce it years in advance, it is possible, IMO. > > I don't think we can do that. Consider, for instance, ext/gd where all > functions are actually in lower case, but I've seen a lot of code > written in pascal or camel case to make the functions better readable, e.g. > > imageCreateFromJpeg() vs. imagecreatefromjpeg() >
Consistent function names at the same time, perhaps? https://wiki.php.net/rfc/consistent_function_names -- Yasuo Ohgaki yohgaki@ohgaki.net