Bug #60547 [Opn->Bgs]: Comparing 9223372036854775807 and 9223372036854775809.2
| From: | cataphract@php.net | Date: | Fri, 16 Dec 2011 20:45:08 +0000 |
| Subject: | Bug #60547 [Opn->Bgs]: Comparing 9223372036854775807 and 9223372036854775809.2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165926@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60547&edit=1
ID: 60547
Updated by: cataphract@php.net
Reported by: krzysiekpia at gmail dot com
Summary: Comparing 9223372036854775807 and
9223372036854775809.2
-Status: Open
+Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: MAC OS X 10.6.8
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is because the comparison implies a conversion of the int operand to float and that conversion
results in the same number. This is expected behavior.
Previous Comments:
------------------------------------------------------------------------
[2011-12-16 20:12:16] krzysiekpia at gmail dot com
Description:
------------
var_dump(9223372036854775807 >= 9223372036854775809.2) evaluates true.
Test script:
---------------
var_dump(9223372036854775807 >= 9223372036854775809.2);
Expected result:
----------------
bool(false)
Actual result:
--------------
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60547&edit=1