Re: [VOTE] Strict operators directive

From: Date: Tue, 09 Jul 2019 10:09:58 +0000
Subject: Re: [VOTE] Strict operators directive
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-106195@lists.php.net to get a copy of this message
Am 09.07.19 um 12:06 schrieb Christian Schneider: > Am 09.07.2019 um 11:30 schrieb Marco Pivetta <ocramius@gmail.com>: >> I wasn't sure about the full implications of this, but after some thought, >> the worst that can happen is excessive strictness, requiring to drop a >> single declaration on top of a file 👍 > > 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. > > 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. But that's the same for declare(strict_types=1); Cheers Andreas -- ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andreas@heigl.org N 50°22'59.5" E 08°23'58" | | http://andreas.heigl.org http://hei.gl/wiFKy7 | +---------------------------------------------------------------------+ | http://hei.gl/root-ca | +---------------------------------------------------------------------+

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#106195) next »