Bug #14096: strange behavior with NULL value

From: Date: Sun, 18 Nov 2001 00:47:49 +0000
Subject: Bug #14096: strange behavior with NULL value
Groups: php.dev 
Request: Send a blank email to php-dev+get-70768@lists.php.net to get a copy of this message
From: david.phpnet@gazolinemm.com Operating system: win2k PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: strange behavior with NULL value consider the following script: $a = ""; $b = NULL; echo $a == $b ? "true" : "false"; /* weird! it does return TRUE */ echo is_null($a) ? "true" : "false"; // returns FALSE echo is_null($b) ? "true" : "false"; // returns TRUE echo empty($a) ? "true" : "false"; // returns TRUE echo empty($b) ? "true" : "false"; // returns TRUE echo isset($a) ? "true" : "false"; // returns TRUE echo isset($b) ? "true" : "false"; // returns FALSE -- Edit bug report at: http://bugs.php.net/?id=14096&edit=1

« previous php.dev (#70768) next »