|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-08 19:11 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 10:00:01 2026 UTC |
Description: ------------ if the string is starting by characters, it will be true if compare with zero. Reproduce code: --------------- $a="a.1afdsfdsfsd"; if($a==0) { echo "YES"; } shows YES $a=".1afdsfdsfsd"; if($a==0) { echo "YES"; } shows nothing $a="1afdsfdsfsd"; if($a==0) { echo "YES"; } shows nothing Expected result: ---------------- $a="a.1afdsfdsfsd"; if($a==0) { echo "YES"; } shows nothing Actual result: -------------- $a="a.1afdsfdsfsd"; if($a==0) { echo "YES"; } shows YES