ID: 14096 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: win2k PHP Version: 4.0.6 New Comment:
It's perfectly normal. The "" gets converted to NULL here. Use === to check for both contents and type. Derick Previous Comments: ------------------------------------------------------------------------ [2001-11-17 19:47:49] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=14096&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]