#43859 [Opn->Bgs]: Wrong comparison
| From: | jani@php.net | Date: | Fri, 18 Jan 2008 01:25:30 +0000 |
| Subject: | #43859 [Opn->Bgs]: Wrong comparison | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121382@lists.php.net to get a copy of this message | ||
ID: 43859
Updated by: jani@php.net
Reported By: seocar at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Fedora Core
PHP Version: 5.2.5
New Comment:
RTFM: http://www.php.net/manual/en/language.operators.comparison.php
And there it says under the table:
"If you compare two numerical strings, they are compared as integers."
Previous Comments:
------------------------------------------------------------------------
[2008-01-15 20:27:28] seocar at gmail dot com
Description:
------------
Wrong comparison between two strings.
(Yes, I know about strict comparison, but I want to know about this
case)
Reproduce code:
---------------
if ("0000" == "0e01")
echo "BUG";
else
echo "OK";
Expected result:
----------------
OK
Actual result:
--------------
BUG
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43859&edit=1