PHP 4.0 Bug #8495 Updated: Bug #6818 continued

From: Date: Wed, 10 Jan 2001 19:43:06 +0000
Subject: PHP 4.0 Bug #8495 Updated: Bug #6818 continued
Groups: php.dev 
Request: Send a blank email to php-dev+get-43718@lists.php.net to get a copy of this message
ID: 8495 User Update by: mark@dreamzpace.com Old-Status: Feedback Status: Open Bug Type: Variables related Description: Bug #6818 continued Taken from bug 6818: <? $variable = 0; if ($variable == "some_string") { print "This must be a bug?! Variable set as $variable.\n\n<br>"; $variable++; if ($variable != "some_string") { print "But with variable set as $variable it works fine.\n\n"; } } else { print "This works as I expected.\n\n"; } ?> Previous Comments: --------------------------------------------------------------------------- [2001-01-09 10:27:13] stas@php.net Could you please describe your problem and give an example of faulty code? --------------------------------------------------------------------------- [2000-12-30 13:51:06] mark@dreamzpace.com In response to (the closed) bug #6818 (I can't reopen it): Using === instead of == is not a solution in my opinion: - it's not compatible with older code (php3) - it's still a bug: comparing a variable with value 0 with a string should always return 'false', regardless the type. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8495

« previous php.dev (#43718) next »