Edit report at https://bugs.php.net/bug.php?id=55421&edit=1

 ID:                 55421
 Updated by:         [email protected]
 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

Reply via email to