Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71616 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30301 invoked from network); 26 Jan 2014 23:57:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2014 23:57:04 -0000 Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.41 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.216.41 mail-qa0-f41.google.com Received: from [209.85.216.41] ([209.85.216.41:57502] helo=mail-qa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/AA-12631-FC0A5E25 for ; Sun, 26 Jan 2014 18:57:03 -0500 Received: by mail-qa0-f41.google.com with SMTP id w8so6557068qac.0 for ; Sun, 26 Jan 2014 15:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=VLHRY/tx57EfzDv9uwFyr5JIRbGYM9CfCQzB9YUtU+w=; b=mo7MWj0pkTDlwxIrb+RpuyhbDG82F8LGpmROZi7zbsME9GaccZFhb80cxDz6jsuToA Is10LG9H+68mvIJB4M7uDqEex6FZN7SUqwQykvswRUA9bfJpiCAyw9A52yAOL45Hen3I GWjXwmEXobcCRC4Cd6SeET6OxS1tQ6/xmylXmvY9avFvkL+9caPYRUxhBvejIT6ClzG3 jrHwm5aoBE+ezcBFUpeXDprOdxp3Bt9jnrnfDsK/b1JRhOgQaJD5CXPyQwlpvbSv1CTA XV21fltfBnhUBD0MReCMrSKZ1vWIYODNM+cBji5gP4Js6DmYMsss6aoOl2uayHjivTpi lWDg== MIME-Version: 1.0 X-Received: by 10.224.74.74 with SMTP id t10mr39145340qaj.82.1390780620735; Sun, 26 Jan 2014 15:57:00 -0800 (PST) Sender: are.you.winning@gmail.com Received: by 10.229.240.193 with HTTP; Sun, 26 Jan 2014 15:57:00 -0800 (PST) In-Reply-To: <52E59883.5060200@ajf.me> References: <52E55D0F.3030308@ajf.me> <52E59883.5060200@ajf.me> Date: Sun, 26 Jan 2014 23:57:00 +0000 X-Google-Sender-Auth: RA0aR8mgBy2TUpAYYMj9Uq6-yIg Message-ID: To: Andrea Faulds Cc: Chris Wright , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP and case-sensitivity inconsistency in PHP 6 From: daverandom@php.net (Chris Wright) On 26 January 2014 23:21, Andrea Faulds wrote: > Why's that silly? The uppercase form of =DF is SS. PHP isn't case-insensi= tive > at the moment, merely case-insensitive for ASCII only. > This alters the issue somewhat - it opens up the unicode can of worms and it's almost completely unresolvable without changing the rules for identifiers fundamentally. At the moment identifiers can be ASCII [a-zA-Z0-9] plus >=3D0x80, but no case translation is performed outside the bounds of ASCII [a-zA-Z0-9] - if we were to start interpolating case outside these bounds the a) we'd need to pick a standard set of valid code points (presumably unicode?) and we'd need to start doing some (relatively) complex validation of names. > On a different note, your case-sensitive at declare, case-insensitive at = use > approach would not work well for consistency. Consider variables, for > example. There is no difference (except for static variables, I suppose) > between declaration and usage when we're dealing with assignments. Hence > we'd have to have two sets of rules: Semi-case-insensitivity for function= s, > and case-sensitivity for variables. Yuck. I'd rather pick one system > (preferably case-insensitivity) and use it everywhere. This is true, but essentially what I'm suggesting is that the check is performed at the point where an entry is created in the relevant symbol table - if an operation would end up creating a thing that already exists with a different casing, blow up. This is already what happens for function/class etc declarations, I'm just suggesting extending this to variables. Thanks, Chris