Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83816 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18290 invoked from network); 25 Feb 2015 19:16:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2015 19:16:24 -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.51 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.51 mail-qa0-f51.google.com Received: from [209.85.216.51] ([209.85.216.51:44913] helo=mail-qa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/E0-12216-78F1EE45 for ; Wed, 25 Feb 2015 14:16:23 -0500 Received: by mail-qa0-f51.google.com with SMTP id i13so4269410qae.10 for ; Wed, 25 Feb 2015 11:16:20 -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=zbzmVvwV4mfDVxF7/ZOujMznxs/WbKST98QkD2svGzE=; b=HRLLORhHtxU4ihf/hF80WfPiF+Gnny6Gnw6dXgvzZf5xEPQfGaVyQP+lHcz8AVO40T 6s71Ppf6Sa3nA88xCxihW0X7xGL0CZO20i7ncN8VffXiMwTRuxrIjMdspDYDEd+OuSZh hWYwaA8Vp5GR4noSP1bngaovLeLmAa9qtjxvyB4K8ev/1k4QOJ6iuNat3BKrPpu9kOhG g635jNVGd/wFzDP1DaWrpg6SIEgqo/w8NgArTsqOvgIutDA+gdlcwRiZaOCgzQ/ha+lt w7HnHNeRI7wKlodBYwKkI/F7ohv+PJliwShfGn5ClaWSwyAcJ+TstYrAJxDmOSH14c4K LNQQ== MIME-Version: 1.0 X-Received: by 10.140.133.69 with SMTP id 66mr10289894qhf.17.1424891780343; Wed, 25 Feb 2015 11:16:20 -0800 (PST) Received: by 10.96.39.195 with HTTP; Wed, 25 Feb 2015 11:16:20 -0800 (PST) In-Reply-To: References: Date: Wed, 25 Feb 2015 11:16:20 -0800 Message-ID: To: Dmitry Stogov Cc: Alexander Lisachenko , PHP internals list Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [Discussion] Last chance for case-sensitive engine From: pierre.php@gmail.com (Pierre Joye) On Wed, Feb 25, 2015 at 10:52 AM, Dmitry Stogov wrote: > 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. I fully agree and why I will vote no on that. Even if I know many projects that won't even notice such changes. But I also have no idea how many 1000s projects out there won't be as happy. -- Pierre @pierrejoye | http://www.libgd.org