Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15736 invoked from network); 25 Feb 2015 18:52:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2015 18:52:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.223.169 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.223.169 mail-ie0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:33449] helo=mail-ie0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/80-12216-70A1EE45 for ; Wed, 25 Feb 2015 13:52:57 -0500 Received: by iecar1 with SMTP id ar1so7622383iec.0 for ; Wed, 25 Feb 2015 10:52:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=d4CM4I+EciezT/XtOTuM98lTqKFOo+C9UUuOrXAP0RU=; b=Jhh+He3PNt+0v7+1E0fbVgmjM3QWe3sORIZx37GXiuF/cCFft5DII8JpRb9lqR4ne4 2nhA1Zr0a/915az9L+lcYpxg8L9CpvRVi7T/pj81fZV/UUlPFPKUzV33xfaBxM9qtkSF 2RUogMz6J5pKTockM3PEk1EVxX1tpfl9MLcqsjzEJClxaHYFHwY2iXzbpaBlv72Joc1y WIqetfktiI0K3sls8MrMPr4u6s/k0R02euOmFogLXcffaFtjqKgBYabc3UEMXUbVTMUd GaiBfZzGeQGUPpAKnxQoEF/KwwLKR9Sb+dLfsAr4mWQTP1BSKA9H7kDkibpACtSE4r9X 7QOA== X-Gm-Message-State: ALoCoQk1LEv22A0Q9Puv9wJPx/IE2yJP06EA5OIsAhnJGVE7+ZGo/4XM7fl71Wo3wyZpWVOup/xT6m74ccV/8UnGxvv7CDeZrSGzEmt7leYJHi248xFF2nilxNmEpiC5hHtvDyxYfhjSop2Tue9hWupCzj/CwO3nSQ== MIME-Version: 1.0 X-Received: by 10.107.5.212 with SMTP id 203mr3759864iof.4.1424890372802; Wed, 25 Feb 2015 10:52:52 -0800 (PST) Received: by 10.107.25.72 with HTTP; Wed, 25 Feb 2015 10:52:52 -0800 (PST) In-Reply-To: References: Date: Wed, 25 Feb 2015 22:52:52 +0400 Message-ID: To: Alexander Lisachenko Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a113f02e283e7f7050fee2400 Subject: Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine From: dmitry@zend.com (Dmitry Stogov) --001a113f02e283e7f7050fee2400 Content-Type: text/plain; charset=UTF-8 Hi Alexander, On Tue, Feb 24, 2015 at 10:48 AM, Alexander Lisachenko < lisachenko.it@gmail.com> wrote: > Morning! > > I want to ask this question one more time before PHP7 feature freeze: can > we the engine case sensitive from PHP>=7.0? > > 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 > > Thoughts? > I case we would designed a new language I would rise two hands. Changing, syntax in an existent widely used language is an additional pain for users. Technically it shouldn't be very difficult to remove support for case-insensitivity, and it'll even improve speed and memory consumption, but I don't think it costs the compatibility break. Thanks. Dmitry. --001a113f02e283e7f7050fee2400--