Re: '9223372036854775807' == '9223372036854775808'
| From: | Rasmus Lerdorf | Date: | Fri, 13 Apr 2012 16:12:39 +0000 |
| Subject: | Re: '9223372036854775807' == '9223372036854775808' | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59886@lists.php.net to get a copy of this message | ||
On 04/13/2012 09:09 AM, Stas Malyshev wrote:
> However I think it would make sense not to use this conversion in string
> comparisons when we know it's lossy - it seems to be outside of the use
> case for such comparisons and it seems apparent by now that it is hard
> for people to understand why it works this way.
Yup, I agree, if the type juggling loses data we should skip the juggle
and do a direct comparison which I think is what Gustavo's patch does.
If people explicitly cast things then the cast, even if it is lossy,
should happen.
-Rasmus