Re: [VOTE] Saner string to number comparison

From: Date: Fri, 17 Jul 2020 16:34:55 +0000
Subject: Re: [VOTE] Saner string to number comparison
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111072@lists.php.net to get a copy of this message
On Fri, Jul 17, 2020 at 6:29 PM Benjamin Morel <benjamin.morel@gmail.com> wrote: > Thanks for this RFC, Nikita! This is definitely a step in the right > direction, and I can only hope it will pass. > > One question: > > > (...) by using a number comparison only if the string is actually > numeric. *Otherwise the number is converted into a string, and a string > comparison is performed.* > > Is there a reason to perform another comparison as a string, when the > string is not numeric? I can’t think of a case where the string comparison > would match. > Comparisons are not just about equality, they are also about ordering. Nikita

« previous php.internals (#111072) next »