PHP 4.0 Bug #4765: $NULL / $null are equal to 0

From: Date: Thu, 01 Jun 2000 20:44:20 +0000
Subject: PHP 4.0 Bug #4765: $NULL / $null are equal to 0
Groups: php.dev 
Request: Send a blank email to php-dev+get-20011@lists.php.net to get a copy of this message
From: nic@undiluted.org Operating system: linux kernel 2.2.14 PHP version: 4.0.0 Release PHP Bug Type: Other Bug description: $NULL / $null are equal to 0 I was getting some error In a larger script I wrote which worked fine with php3..x. For some reason thou I came to find out that $null or $NULL was equal to 0 for some reason. I dont know if this was intended or not but if it wasn't that seems like a bug to me anyways. Usually null is set to be equal to \0 maybe the \ is missing somewhere or something. here is a small script to try to see the results I got. <? $test = 0; if ($test == $NULL) print "yes"; else print "No"; ?>

« previous php.dev (#20011) next »