ID: 38170 Updated by: [EMAIL PROTECTED] Reported By: erick at vmxt dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows XP SP2 PHP Version: 5.1.4 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 RTFM Previous Comments: ------------------------------------------------------------------------ [2006-07-20 22:30:24] erick at vmxt dot com Description: ------------ When comparing number zero with a not empty string, it returns true. Reproduce code: --------------- <?php $something = 0; if($something) { echo $something . "is true. <br />"; } if ("thestring") { echo "thestring is true" . "<br />"; } if ($something == "thestring") { echo "why?" . "<br />"; } if("thestring" == $something) { echo "again why?" . "<br />"; } ?> Expected result: ---------------- thestring is true Actual result: -------------- thestring is true why? again why? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38170&edit=1