Re: bug 54547

From: Date: Fri, 15 Jun 2012 02:17:55 +0000
Subject: Re: bug 54547
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-60843@lists.php.net to get a copy of this message
On Fri, Jun 15, 2012 at 8:56 AM, Hartmut Holzgraefe <hartmut.holzgraefe@gmail.com> wrote: > Too late to raise this now anyway, but ... > > On 13.05.2012 04:39, Stas Malyshev wrote: >> I know this was discussed a number of times here, but just to bring it >> to a conclusion - I intend to apply patch in the bug report - which >> removes conversion for strings that do not convert to integers - to 5.4. >> If anybody sees anything that breaks because of this please tell. > > "12345678901234567890" == "12345678901234567890.0" > > used to be true, is now false ... i'd still say that's ok though as > it is a case of "never compare floats for equality" here, now that > the decimal clearly says that at least the right side is supposed > to be float, not integer ... I don't think this is a case of "never compare floats for equality", as: 12345678901234567890.0 == 12345678901234567890.1 The number is simply too big, even for a float, to handle reliably. In fact number_format(12345678901234567890.0, 1, '', '') == '123456789012345671680' > > -- > hartmut > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- -- Tjerk

« previous php.internals (#60843) next »