Bug #12453: comparing 0=="null" is true?

From: Date: Sun, 29 Jul 2001 02:54:40 +0000
Subject: Bug #12453: comparing 0=="null" is true?
Groups: php.dev 
Request: Send a blank email to php-dev+get-61344@lists.php.net to get a copy of this message
From: btanner@home.com Operating system: Win2k PHP version: 4.0.6 PHP Bug Type: Scripting Engine problem Bug description: comparing 0=="null" is true? If you compare the integer(0) to the string "null", PHP thinks they are the same. Am I hopped up on goofballs, or whats up here? $MyVar=0; if($MyVar=="null") print("apparently $MyVar is equal to \"null\""); else print("its not null, its $MyValue"); -- Edit bug report at: http://bugs.php.net/?id=12453&edit=1

« previous php.dev (#61344) next »