Bug #63220 [Opn->Nab]: Camparison Operator
| From: | pierrick@php.net | Date: | Fri, 05 Oct 2012 03:48:01 +0000 |
| Subject: | Bug #63220 [Opn->Nab]: Camparison Operator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-173899@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63220&edit=1
ID: 63220
Updated by: pierrick@php.net
Reported by: ellyx at dewata-production dot com
Summary: Camparison Operator
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Opensuse 12.1
PHP Version: 5.3.7
Block user comment: N
Private report: N
New Comment:
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
http://www.php.net/manual/fr/types.comparisons.php
Previous Comments:
------------------------------------------------------------------------
[2012-10-05 03:23:14] ellyx at dewata-production dot com
I think it not just the comparison with string 'ids', i think this happen in
every string end with 'ids' for example
var_dump(0 == 'testIds');
Expected: false
Actual: true
------------------------------------------------------------------------
[2012-10-05 03:16:38] ellyx at dewata-production dot com
Description:
------------
I think there is a bug in comparison operator,
when i compare 0 with string 'ids' it return true, it should be return false
Test script:
---------------
var_dump(0 == 'ids')
if(0 == 'ids'){
echo 'true';
}
$str = 'ids';
if(0 == $str){
echo 'test';
}
Expected result:
----------------
false
Actual result:
--------------
true
'true'
'test'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63220&edit=1