Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106200 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80865 invoked from network); 9 Jul 2019 15:03:09 -0000 Received: from unknown (HELO mail1.25mail.st) (206.123.115.54) by pb1.pair.com with SMTP; 9 Jul 2019 15:03:09 -0000 Received: from [10.0.1.86] (unknown [49.48.243.230]) by mail1.25mail.st (Postfix) with ESMTPSA id 4FFBE60512; Tue, 9 Jul 2019 12:22:38 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Tue, 9 Jul 2019 19:22:34 +0700 Cc: Marco Pivetta , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <762824AF-0F0B-419A-8D91-33FC1CC0DEC4@koalephant.com> References: To: Christian Schneider X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [VOTE] Strict operators directive From: php-lists@koalephant.com (Stephen Reay) > On 9 Jul 2019, at 17:06, Christian Schneider = wrote: >=20 > When you drop the declaration on top of the file the semantics of your = operators suddenly change, e.g. > "42" < "7" > changes from true to false and you get subtle bugs. If you OPT IN to strict operators, the onus is on you to check that your = code still works, just like it is with every other new feature that you = can CHOOSE to use or not. > And if you try to read other people's code (or even try to copy/paste = it) then make sure you keep in mind which mode they are programming in. It=E2=80=99s disappointing that =E2=80=9CI need to copy paste this code = and it might not do what I expect=E2=80=9D is more important to people = than fixing things like the way switch statement does comparisons, which = makes zero practical sense right now.=