ID: 45495 Updated by: [EMAIL PROTECTED] Reported By: xamine at gmail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: FreeBSD and WIN PHP Version: 5.2.6 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 See http://docs.php.net/manual/en/types.comparisons.php Previous Comments: ------------------------------------------------------------------------ [2008-07-12 17:33:37] xamine at gmail dot com Description: ------------ I think there is a bug in the logic when comparing a string to int(0). I experience this bug on both MS windows and FreeBSD, on PHP 5.2.5 and PHP 5.2.6 and using Apache 2.0 / 1.3. Reproduce code: --------------- //Here is three ways of reproducing the same error. var_dump("test"==0); var_dump(("anotherTest"==0)); //... and finaly ... $bool=("abc"==0); var_dump($bool); Expected result: ---------------- I expect them all to return bool(false), I expect only "0"==0 to return true. Actual result: -------------- They all return bool(true), nomather what string i compare to 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45495&edit=1
