Re: Don't compare zero exponentials in strings as equal

From: Date: Thu, 04 Mar 2021 09:54:25 +0000
Subject: Re: Don't compare zero exponentials in strings as equal
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-113364@lists.php.net to get a copy of this message
Am 04.03.2021 um 01:37 schrieb Ben Ramsey <ben@benramsey.com>:
> On Mar 3, 2021, at 14:25, Kamil Tekiela <tekiela246@gmail.com> wrote:
>> 
>> when both are strings then chances are that this is an error.
> 
> Except when comparing two values from sources known to provide numbers as strings, such as form
> input and database results. :-)


This would be a problem for leading zeroes and leading/training spaces, right?

Leading zeroes theoretically could happen in databases, leading/training spaces happen in form input
and possibly databases.
Are there other 'common' cases?

- Chris


Thread (16 messages)

« previous php.internals (#113364) next »