Re: PHP and case-sensitivity inconsistency in PHP 6

From: Date: Sun, 26 Jan 2014 22:52:05 +0000
Subject: Re: PHP and case-sensitivity inconsistency in PHP 6
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
I'm all for casing consistency. I'm very much *against* all-out case
sensitivity. I don't want it to be possible to define a function foo
and a function Foo that do different things.

So essentially, I would like to see case sensitivity at call time
(called name must match declaration), but case insensitivity at
declaration time (when checking whether a symbol has already been
declared):

// no change
function foo() {}
function Foo() {} // error, cannot redeclare function foo

// new behaviour
foo(); // works
Foo(); // error, called name inconsistent with declared name

Thanks, Chris

On 26 January 2014 19:07, Andrea Faulds <[email protected]> wrote:
> Good evening all,
>
> With the recent discussions making it likely we'll start thinking about
> things to add, and more importantly, break in PHP 6, I'd like to bring up
> the topic of case-sensitivity in PHP again.
>
> Would it be possible for us to finally be consistent in PHP 6, with
> everything being case-sensitive (or case-insensitive, as the case may be)?
> It would be a quite major backwards-compatibility break, but it would also
> be one that an automated tool could easily fix your code for. Perhaps
> something like Python's 2to3.
>
> Thoughts?
> --
> Andrea Faulds
> http://ajf.me/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>


Thread (15 messages)

« previous php.internals (#71612) next »