Bug #55421 [Opn->Bgs]: 0=="%"
| From: | salathe@php.net | Date: | Sun, 14 Aug 2011 22:29:36 +0000 |
| Subject: | Bug #55421 [Opn->Bgs]: 0=="%" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162584@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55421&edit=1
ID: 55421
Updated by: salathe@php.net
Reported by: php at jasonborro dot com
Summary: 0=="%"
-Status: Open
+Status: Bogus
Type: Bug
Package: Variables related
Operating System: Windows 7
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
This is the expected and documented behaviour. To compare the string to an integer as in the test
script, the string is translated to integer [1] as described in "String conversion to
numbers" [2].
[1] http://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.types
[2] http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
Previous Comments:
------------------------------------------------------------------------
[2011-08-14 22:12:22] php at jasonborro dot com
Description:
------------
Seriously, try it.
Test script:
---------------
if (0=="%") echo "FAIL!";
Expected result:
----------------
no FAIL!
Actual result:
--------------
FAIL!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55421&edit=1