ID: 49179 Updated by: j...@php.net Reported By: steve at ezd dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: linux PHP Version: 5.2.10 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 PLEASE search the bug database before you submit same issue as a bug again. This is not a bug. It's said in the manual too, try reading that also. Previous Comments: ------------------------------------------------------------------------ [2009-08-06 16:05:55] steve at ezd dot com Description: ------------ please run source code, it's self explained it seems that when use 0 to compare with string, it returns true all the time, problem in if is when using ==, === has no problem in switch case, it matches the first non number case Reproduce code: --------------- if (0=="a") echo "this is ture."; $check=0; switch ($check) { case 'a': echo "this is a "; break; default : echo "no match"; } Expected result: ---------------- no match Actual result: -------------- this is ture.this is a ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49179&edit=1