|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-06 20:07 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 07:00:02 2025 UTC |
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