Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100597 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17680 invoked from network); 14 Sep 2017 15:45:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2017 15:45:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.220.177 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.220.177 mail-qk0-f177.google.com Received: from [209.85.220.177] ([209.85.220.177:51029] helo=mail-qk0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/E1-19300-014AAB95 for ; Thu, 14 Sep 2017 11:45:20 -0400 Received: by mail-qk0-f177.google.com with SMTP id s132so747326qke.7 for ; Thu, 14 Sep 2017 08:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=i0vk3jQOTKFHEcHKnzDccrzzDjKcXoHMWd3J70zDbDo=; b=MbtYCRVqSwOl8atdEcI6GLPPMt+4jbZsCvTfSKDDpMp4F59bPslUjO5rAqSogFDmJb kF0R4Lq8iIvpA2CFRPc0eqrjxXuAyWfhVhusDXj8lqMMHAHrlCWhkS1cJ0ZhgcEHwEL5 StrZN6Ui95irervArxu3FDqyfnN+9GcKJQWfZZtVFuZr3dtsvWxHDu0ZrNeT7YRzUpcb k+hZLPFJam8m3EXvFLYfce+o4/pqF76Vcuw9vtHwtd3+NMxr3bIP5vjLjj3iEYfYLa74 iG7WZMDhWXy3CpkUbLdp6YUQM/FutViYcpbnwS1Nl2i117zvw4UPzhWflkwL75z9pSns s1Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=i0vk3jQOTKFHEcHKnzDccrzzDjKcXoHMWd3J70zDbDo=; b=dbMcqMB2IEBVMnm6Mfq7KTFma+7KJfWkcm8E8Vw5SrSu8YN4xUcTjj6sokzJc9PVBD Gd5eiKcpYKXjDen35PQLuKv7Gn2/hBkB+aIlsKp5Ikoy0fKV24z4fW1opM4uWkl9is5h 2N2pjv/WB0DKvd7UxD5XbOrCJJrQKM3mWuwrmPW3oukjLeXxM4HrBZiwW/cx0b3k7pHV EcljKHPmpNYf5pJy5IK5t4f7p3I7j8ypb5HihrMrvcsmrRAyMGD57VhnGcumfLd17Nn0 m64HwtqfjrlkjD4pSzoHEsj8k0xTAoW9dyHAH4OiCm7RZ4heiVtq+TUYqpgWkqjYUz37 kuyA== X-Gm-Message-State: AHPjjUhSZy1Bih+bOC5Pql2gmIWY0xzgz/Kmdkw+X7sGU8+F8UaQ3uVf 3+IMDKNxRkv0BGfm2RHmCtMA6c0nEe3jmvxC9c2a37+p X-Google-Smtp-Source: AOwi7QBU9aFsNaMaDZloi8GLodllD5ZMhlcv70SMmD34Agg63+iNq38KWSM/zavucLt3rTpmsUlsUxWixQvqZV76qC4= X-Received: by 10.55.33.75 with SMTP id h72mr3077620qkh.132.1505403917774; Thu, 14 Sep 2017 08:45:17 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.12.132.3 with HTTP; Thu, 14 Sep 2017 08:45:16 -0700 (PDT) X-Originating-IP: [206.252.215.26] In-Reply-To: <8bbbf6e8-269b-fb6d-64e1-374a40e79638@tekwire.net> References: <3D.0C.10715.383F8B95@pb1.pair.com> <20b8b6fa-ec81-eba9-d33b-b54b815e9e5d@lsces.co.uk> <88.FC.19300.2418AB95@pb1.pair.com> <20170914133846.GQ8096@phcomp.co.uk> <8bbbf6e8-269b-fb6d-64e1-374a40e79638@tekwire.net> Date: Thu, 14 Sep 2017 11:45:16 -0400 X-Google-Sender-Auth: 1pg8vQ_YeLvJLd0Gzdhv3FWJiPg Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Deprecate and remove case-insensitive constants? From: pollita@php.net (Sara Golemon) On Thu, Sep 14, 2017 at 11:37 AM, Fran=C3=A7ois Laupretre wrote: > Le 14/09/2017 =C3=A0 15:38, Alain Williams a =C3=A9crit : >> >> I vote for making it case sensitive: simpler for the parser; the >> programmer >> rapidly learns that it should be 'TRUE' and not 'true' -- job done. > > > No need to force people to switch their code to 'TRUE'. Just supporting > case-sensitive 'TRUE', 'true', and 'True' (the same for false and null) > should be enough. Not supporting 'tRUE' or 'TrUe' anymore will also be a > positive side effect for code readability. > +0.9 this. It feels pretty simple to resolve this special-case for case-sensitivity at any stage of the compile, but the reality is that TRUE/True/true covers 99% of uses, and a static analyzer can *trivially* find those other cases prior to an upgrade. Heck, 3 minutes with a token_get_all() script can find 'em, even produce a rewrite diff if you're so inclined. Nevermind, make that +1. The ease of auditing mixed-case uses makes supporting it in the compiler not worth the maintenance. -Sara