Re: Don't compare zero exponentials in strings as equal
From: Rowan Tommins Date: Thu, 04 Mar 2021 09:03:52 +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-113362@lists.php.net to get a copy of this message
On 04/03/2021 00:37, Ben Ramsey wrote:On Mar 3, 2021, at 14:25, Kamil Tekiela <tekiela246@gmail.com> wrote:The juggling only makes a difference if the two sources provide different representations of the same number - "12345" is equal to "12345" whether you cast both sides to int or leave both as strings. Regards, -- Rowan Tommins [IMSoP]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. :-)
Thread (16 messages)
| « previous | php.internals (#113362) | next » |
|---|