Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83717 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92101 invoked from network); 24 Feb 2015 23:45:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 23:45:42 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:59002] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/BC-24698-32D0DE45 for ; Tue, 24 Feb 2015 18:45:40 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 91F074B0150; Wed, 25 Feb 2015 00:45:21 +0100 (CET) Reply-To: To: "'Alain Williams'" , References: <20150224093143.GC1891@phcomp.co.uk> In-Reply-To: <20150224093143.GC1891@phcomp.co.uk> Date: Wed, 25 Feb 2015 00:45:33 +0100 Message-ID: <08b901d0508b$fb4ce060$f1e6a120$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIPk8nXQdC7YxKTesF5vliHaD2pywJ92JufAaC3teOcYPNvMA== Content-Language: fr X-Antivirus: avast! (VPS 150224-1, 24/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] [Discussion] Last chance for case-sensitive engine From: francois@php.net (=?iso-8859-1?Q?Fran=E7ois_Laupretre?=) Hi, I started the RFC because I first wanted to test the idea on the list = and have a place to store every case-insensitive I could find in PHP. I stopped for several reasons : 1. The reactions were mostly negative, with a majority of 'breaks much, brings nothing' opinions, 2. Crawling through the code, I discovered that code to handle case insensitivity was spread all around PHP. Example: I thought that = function and method names could be made case-sensitive by modifying a limited = number of lines of code. Actually, it seems it is handled in a more or less redundant way in a lot of locations. So, I quickly realized that implementation would be extremely complex. 3. A lot of PHP code is, knowingly or not, using PHP case insensitivity. 4. A patch to make PHP case sensitive would be very complex, and = providing a two-mode mechanism still much more. It would require in many cases to provide another case-sensitive test after each case-insensitive one and raise an error if both don't match. We must do that because = case-insensitive comparisons are done using a case-sensitive comparison of two strings previously converted to lowercase. It would also require to store every class/function/method names twice, as they are currently stored in = lowercase form. As lowercase names are transmitted as strings around the code, it = is very complex to keep the link with the original value. So, to summarize, = I now consider that providing a compatibility 'notice-only' mode is practically impossible. So, while it seemed attractive at first, I stopped working on it. I'll maybe revive it one day or another but, at the moment, it is not = worth the pain working on a very complex change that would have almost no = chance to pass. Regards Fran=E7ois > -----Message d'origine----- > De=A0: Alain Williams [mailto:addw@phcomp.co.uk] > Envoy=E9=A0: mardi 24 f=E9vrier 2015 10:32 > =C0=A0: internals@lists.php.net > Objet=A0: Re: [PHP-DEV] [Discussion] Last chance for case-sensitive = engine >=20 > On Tue, Feb 24, 2015 at 06:23:04PM +0900, Yasuo Ohgaki wrote: >=20 > > 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 >=20 > +1 >=20 > There will be those who just won't make changes and for who PHP9 will = be a > ''surprise'' - but similar happened with the removal of register = globals. >=20 > -- > Alain Williams > Linux/GNU Consultant - Mail systems, Web sites, Networking, = Programmer, > IT Lecturer. > +44 (0) 787 668 0256 http://www.phcomp.co.uk/ > Parliament Hill Computers Ltd. Registration Information: > http://www.phcomp.co.uk/contact.php > #include >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php