#41814 [Bgs->Opn]: String comparison changed
| From: | thomas dot hebinck at digionline dot de | Date: | Wed, 27 Jun 2007 09:10:39 +0000 |
| Subject: | #41814 [Bgs->Opn]: String comparison changed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114312@lists.php.net to get a copy of this message | ||
ID: 41814
User updated by: thomas dot hebinck at digionline dot de
Reported By: thomas dot hebinck at digionline dot de
-Status: Bogus
+Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 5.2.3
New Comment:
The problem is, that the behaviour changed from 5.2.0. to 5.2.1.
The two integers are not the same - they are just both out of range.
It seems that PHP 5.2.0 didn't convert strings with out of range
integers to integer while comparing, but PHP 5.2.1 does.
Previous Comments:
------------------------------------------------------------------------
[2007-06-27 08:23:44] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You are comparing two numeric strings.
http://www.php.net/manual/en/language.operators.comparison.php
------------------------------------------------------------------------
[2007-06-26 18:46:06] thomas dot hebinck at digionline dot de
Description:
------------
The behaviour of the comparison of strings containing integers changed
from PHP 5.2.0 to 5.2.1.
Reproduce code:
---------------
echo (int)('0x100000000000000000'=='0x100000000000000001');
Expected result:
----------------
0 // this was the result in PHP <= 5.2.0
Actual result:
--------------
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41814&edit=1