Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79934 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86440 invoked from network); 25 Dec 2014 05:02:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Dec 2014 05:02:29 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.182 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.182 mail-qc0-f182.google.com Received: from [209.85.216.182] ([209.85.216.182:39353] helo=mail-qc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/52-07310-36A9B945 for ; Thu, 25 Dec 2014 00:02:29 -0500 Received: by mail-qc0-f182.google.com with SMTP id r5so6473751qcx.13 for ; Wed, 24 Dec 2014 21:02:25 -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:content-transfer-encoding; bh=B/9peqqFpPXYzTvROq5BM9NEzZI33Otj7U1FnvYsX24=; b=t3+qI21IVhy43bxyVke2uM1yXL4M99QiPP3E0YP5KGv/jhsFAR1YNnmMyeJjRtKOtt fsoJA8aSh+vqc0Q+2KpzS4BB3LCQMvIBSXuFJns5AoNG85qK/I9gZUDxI44Pnx/2cvyu bLF8T4tta1gdSiVpfYhO5ZPXxqFOZ1H97MeZXc0ZdmINbqKQFfGQ+d188EPc8sJA+9gT qkyELnEq7K5GsO4AyKWMZFfxiP8cnal2h1ssCJds8XdfDtpJ7eZqfi8L4QklRPanOcnn k02MO4eVv89oa8C5pwsFnnTsSSdnlYZuU5kZ96abycTNC5s08lr5xsRf1eE4/9+EPV1Z Me3w== MIME-Version: 1.0 X-Received: by 10.140.86.175 with SMTP id p44mr58009008qgd.54.1419483745018; Wed, 24 Dec 2014 21:02:25 -0800 (PST) Received: by 10.140.22.106 with HTTP; Wed, 24 Dec 2014 21:02:24 -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 16:02:24 +1100 Message-ID: To: francois@tekwire.net Cc: Ferenc Kovacs , Guilherme Blanco , Alain Williams , David Muir , Yasuo Ohgaki , Xinchen Hui , Mike Dugan , Andrea Faulds , Kevin Israel , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Proposal for PHP 7 : case-sensitive symbols From: pierre.php@gmail.com (Pierre Joye) Hi Fran=C3=A7ois, On Thu, Dec 25, 2014 at 2:40 PM, 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 fu= nctions, 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. > >> He will also have to deal with >> file ops while being at it. Should they remain case insensitive? Do >> manual checks to match the path actually being requested (ie. possible >> on windows using meta info), or keep everything the way it is now? > > Do you mean simulating case-sensitive paths on case-insensitive file syst= ems ? Why not, depending on the overhead it brings. Unfortunately, I don't = have the Windows skills required to work on the subject. > > About the overhead the check introduces, note that it is supposed to be t= emporary. The final goal is to store symbols as-Is, eliminating the need fo= r lowercase conversions. This would remove a lot of allocations and calls t= o zend_str_tolower_copy(). This would also remove a lot of code. > Thanks for putting the RFC together. Let sort that out once and for all :) I am definitively not in favor of case sensitivity. However it is still a good thing to have that RFC as this topic keeps pop up once in a while. About the patch: It has to take care about how userland codes (autoloader) will deal with case insensitive file systems. Will they have to take care of it themselves? Or will we keep them the way it is now? You can't simulate case sensitive paths on case insensitive file systems. Some ops may work, but PHP's IO have to be changed too if we do that, and this is totally going too far for my taste :) Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org