ID: 41939 Updated by: [EMAIL PROTECTED] Reported By: steve at tequilasolutions dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: FC4 PHP Version: 5.2.3 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2007-07-09 14:38:46] steve at tequilasolutions dot com Description: ------------ I have a variable set to 0. if ($var=="on") returns true!! This behaviour is not there in php4 Reproduce code: --------------- [EMAIL PROTECTED] php -v PHP 4.3.11 (cgi) (built: Jun 16 2005 17:25:40) Copyright (c) 1997-2004 The PHP Group [EMAIL PROTECTED] php <? $val = 0; if ($val=="on") print "on\n"; ?> [EMAIL PROTECTED] php5 <? $val = 0; if ($val=="on") print "on\n"; ?> on [EMAIL PROTECTED] php5 <? $var = 0; if ($var=='anything') print "anything"; ?> [EMAIL PROTECTED] This bug is also in PHP/5.0.4 and may have been there since then. [EMAIL PROTECTED] Expected result: ---------------- 0 should not equal 'on' or 'anything' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41939&edit=1