Re: [VOTE] Strict operators directive

From: Date: Tue, 09 Jul 2019 12:22:34 +0000
Subject: Re: [VOTE] Strict operators directive
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-106200@lists.php.net to get a copy of this message
> On 9 Jul 2019, at 17:06, Christian Schneider <cschneid@cschneid.com> wrote: > > 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’s disappointing that “I need to copy paste this code and it might not do what I expect” is more important to people than fixing things like the way switch statement does comparisons, which makes zero practical sense right now.

« previous php.internals (#106200) next »