Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83644 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42285 invoked from network); 24 Feb 2015 09:23:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 09:23:51 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.173 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.173 mail-qc0-f173.google.com Received: from [209.85.216.173] ([209.85.216.173:45451] helo=mail-qc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/B0-37184-4234CE45 for ; Tue, 24 Feb 2015 04:23:49 -0500 Received: by qcvp6 with SMTP id p6so15515870qcv.12 for ; Tue, 24 Feb 2015 01:23:44 -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:from:date:message-id :subject:to:cc:content-type; bh=z2tNNTiwo5lLyUP7ANFVJ7/7LIcrdgJImgQLdhwr5Yo=; b=ro/msBBH5FAYeh9dsJMkRBEWKz6fELkOsu04vx3DBz3SzSF2Q4ZCYvSgbCc+X+wa8n CzpjRWmkyoBhjhp8mI0oLJNzmRKhyX1ZjHUY+lifCMd5BGbC1DQarqrC/tB2s+3zhZQV xt7oQeGJoLQ8jFHG8h4fx0pc+ZHOmOPDqV+I4YXwKZDHZOctktiV0P0CHhMkF9z8iPiD JxPNL+6vGIQoixrPqqsNbAWm7AjwyPs2k4/3d/lG3UYwqdgPBJCoI/tIIKPuKxRk67aA rMaRIvRqC61ZDGSmvQAWGItvqclVf5rd/Xxy5Ym5TS/GIiwV+n8hITMnWwP92qeOKOqm YOHA== X-Received: by 10.140.148.20 with SMTP id 20mr33304201qhu.67.1424769824752; Tue, 24 Feb 2015 01:23:44 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Tue, 24 Feb 2015 01:23:04 -0800 (PST) In-Reply-To: References: Date: Tue, 24 Feb 2015 18:23:04 +0900 X-Google-Sender-Auth: 4HA2cgMG2IJTObIi4Xq-NuFErzE Message-ID: To: Alexander Lisachenko Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a113bb4cc4a8d3a050fd2137a Subject: Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113bb4cc4a8d3a050fd2137a Content-Type: text/plain; charset=UTF-8 Hi Alexander, On Tue, Feb 24, 2015 at 4:48 PM, Alexander Lisachenko < lisachenko.it@gmail.com> wrote: > There is a draft for that: https://wiki.php.net/rfc/case-sensitivity > (mostly empty), so I decided to ask this question in the internals mail > list. > > Pros: more simple O(1) hash table checks for properties, functions, > methods, classes without strtolower normalization on the engine/parser > level. Consistency with unicode class names (yes, they are case sensitive, > check http://3v4l.org/ia0pc), consistency with exisiting PSR0,4 standards > (case sensitive mapping of class names to the file names) > > From my experience, all modern PHP framework don't use case-insensitive > code, so chance to break anything for them is really low. > > Cons: on the extension level things aren't so good and can be some BC > breaks (like with phpng) > > Possible ways: > > 1) Keep PHP engine case-insensitive for PHP7 > 2) Make PHP engine case-sensitive since PHP7 with possible minor BC breaks > in the extensions (this breaks can be easily fixed) > 3) Add a compile-time switch, eg. --with-case-sensitivity to the > configuration to have an ability to build PHP with sensitivity and make > this option enabled by default since next major version (PHP>=8.0). Add > deprecation notices in 7.x > INI switch is better. Compiler switch would not work well, since user cannot check their code easily. PHP7 - introduce case sensitivity switch off by default PHP8 - make case sensitivity switch on by default PHP9 - remove case sensitivity switch Case sensitivity is not mandatory. It would be better to choose long term approach. There will be enough time for users to adopt case sensitive names. In mean time, we have no BC in PHP7. It's good for PHP7. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113bb4cc4a8d3a050fd2137a--