Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8710 invoked from network); 25 Dec 2014 12:08:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Dec 2014 12:08:22 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:63875] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/35-07310-43EFB945 for ; Thu, 25 Dec 2014 07:08:21 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so13072570wgh.15 for ; Thu, 25 Dec 2014 04:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6DTs8gxZ6dfS2SCPRJdYeaMPuigoWiG9ONcnDICV3tg=; b=jvsKyQYql/G1l6mldJBDV+7JdTg0BAEp1JqX5fgaXrMOa+r4uQiCiPxH8aTQXMe2WJ TRvMAUuedJT3CumeD8EFmDBsmgupd9Y6TV2EecOCyJVnifgjOnjWjr6NXovIN0eearOi 58ZSOL+Xl31d4R4ATKlY8zjk2mLWTRrnbW1FdekiXVaJaH0hWsO3lGUug9q0J0pw1Imh PTSTWpj2JMqQ86+Zu/kOUZu1H5GiM2uciaj3E4538/fvnxGCRkMPDIGBVJgUrIDjTh/x opbfkO8xpQE2VneAqXUVykReC4P1UYG5L6YTcdi/OaN+RrZd22B9Bj103B1EI+HLU8Fa Uz5A== MIME-Version: 1.0 X-Received: by 10.181.13.106 with SMTP id ex10mr59792174wid.36.1419509297486; Thu, 25 Dec 2014 04:08:17 -0800 (PST) Received: by 10.27.10.196 with HTTP; Thu, 25 Dec 2014 04:08:17 -0800 (PST) In-Reply-To: <009a01d01ff4$7d145470$773cfd50$@tekwire.net> References: <000c01d01ca0$7e70c850$7b5258f0$@yahoo.fr> <000d01d01ec2$46f2f280$d4d8d780$@yahoo.fr> <009a01d01ff4$7d145470$773cfd50$@tekwire.net> Date: Thu, 25 Dec 2014 13:08:17 +0100 Message-ID: To: francois@tekwire.net Cc: Pierre Joye , Ferenc Kovacs , Guilherme Blanco , Alain Williams , David Muir , Yasuo Ohgaki , Xinchen Hui , Mike Dugan , Andrea Faulds , Kevin Israel , PHP Internals Content-Type: multipart/alternative; boundary=f46d043be12c6ea34b050b09435a Subject: Re: [PHP-DEV] Proposal for PHP 7 : case-sensitive symbols From: nikita.ppv@gmail.com (Nikita Popov) --f46d043be12c6ea34b050b09435a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Dec 25, 2014 at 4:40 AM, Fran=C3=A7ois Laupretre wrote: > > > De : Pierre Joye [mailto:pierre.php@gmail.com] > > > > > Anyone dying while waiting to see PHP having case sensitive symbols > > > handling should go ahead with a RFC. > > For those interested, I just created a PR to raise an E_STRICT message on > class and function/method case mismatch : > > https://github.com/php/php-src/pull/965 > > It is not complete yet, as some cases are not trapped, especially for > functions, and the corresponding tests are missing. I'll try to write the > RFC (to propose the feature for PHP7) and finish the patch this week. > Checking constants is more complex than expected as the namespace part is > converted to lowercase during the compile phase. This RFC will deal with > classes and functions (including class methods) only. > May I recommend to only target class and class-like names for an initial RFC? Those have the strongest argument in favor of case-sensitivity given how current autoloader implementations work - essentially the case-insensitivity doesn't properly work anyway in modern code. Constants in particular are more problematic, because they are currently only partially case-sensitive and there are some constants (namely true, false and null) where case sensitivity must not be enforced. So if you want to make constants fully case sensitive those three would have to become reserved keywords. So, I think this has more chances if you tackle one issue at a time. I'd also appreciate having a voting option for removing case-insensitivity right away, as opposed to throwing E_STRICT/E_DEPRECATED. If we want to change this, I personally would rather drop it right away than start throwing E_STRICT warnings that would make the case-insensitive usage impossible anyway. Nikita --f46d043be12c6ea34b050b09435a--