Re: Deprecate and remove case-insensitive constants?
| From: | Levi Morrison | Date: | Thu, 14 Sep 2017 16:02:30 +0000 |
| Subject: | Re: Deprecate and remove case-insensitive constants? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100598@lists.php.net to get a copy of this message | ||
On Thu, Sep 14, 2017 at 9:38 AM, Sara Golemon <pollita@php.net> wrote:
> On Tue, Sep 12, 2017 at 8:02 AM, Christoph M. Becker <cmbecker69@gmx.de> wrote:
>> Usually constant identifiers are treated case-sensitive in PHP. This is
>> always the case for constants defined via a
const
>> declaration.
>> However, define() allows to pass TRUE as third argument to define a
>> case-insensitive constant. This feature appears to potentially result
>> in confusion, and also causes bugs as shown in
>> <https://bugs.php.net/74450>. See an example created
>> by Nikita to see
>> some probably unexpected behavior:
>> <https://3v4l.org/L6nCp>.
>>
> I'd just like to ask everyone on this thread to circle back to the
> actual topic: Case-Insensitive Constants. Nothing else is on topic
> here. If you'd like to argue the value of Turkish case folding and
> its impact on combined symbol tables in 40 year old software, I
> encourage you to start a new thread for that topic.
>
> Of the minority of responses to this thread reflecting on the actual
> goal of the proposal, I've seen responses from "sure, why not?" to
> "what's the point?", but if there was a coherent argument firmly
> against, I must have missed it.
>
> So could we focus on the topic at hand, please?
For what it is worth the Turkish locale issue is on-topic. If we have
case sensitivity and case insensitivity simultaneously in constants
and we decide to drop one then the locale issue points towards
dropping case insensitivity.