|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-09 21:58 UTC] tony2001@php.net
[2005-01-09 22:00 UTC] falk at brockerhoff dot org
[2005-01-09 22:07 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 22:00:01 2025 UTC |
Description: ------------ I got a strange problem while comparing a numeric while with the string "%". Using the numeric value 0 and the string "%" in an if-statement results with true!? Reproduce code: --------------- $foo = '%'; $bar = 0; if ($foo == $var) { echo "what the hell is going on?!\n"; } $foo = '%'; $bar = '0'; if ($foo == $var) { echo "what the hell is going on?!\n"; }