PHP 4.0 Bug #6766 Updated: problem with comparing stings with zero

From: Date: Fri, 15 Sep 2000 03:12:10 +0000
Subject: PHP 4.0 Bug #6766 Updated: problem with comparing stings with zero
Groups: php.dev 
Request: Send a blank email to php-dev+get-33294@lists.php.net to get a copy of this message
ID: 6766 Updated by: sniper Reported By: geoffphillips@hotmail.com Status: Closed Bug Type: *General Issues Assigned To: Comments: Use === instead of ==. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-09-14 18:20:17] geoffphillips@hotmail.com setup: standard php4 install from suse linux 6.4 cd edition bug: all strings compared for equality with zero, evaluates to true e.g. if ("abcd" == 0") print "hello"; always prints "hello" --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6766

« previous php.dev (#33294) next »