Bug #13577 Updated: is_null evaluates true for non-existent variables

From: Date: Sun, 07 Oct 2001 13:57:06 +0000
Subject: Bug #13577 Updated: is_null evaluates true for non-existent variables
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-67482@lists.php.net to get a copy of this message
ID: 13577 Updated by: jeroen Reported By: sander@php.net Status: Open Bug Type: Documentation problem Operating System: Win2K & Debian Linux PHP Version: 4.0.6 New Comment: An uninitialized variable equals NULL. So it _is_ null. This should be in the language.types.null section. Previous Comments: ------------------------------------------------------------------------ [2001-10-07 07:10:43] sander@php.net If it's intended, then it should be documented. Reopened as a documentation problem. ------------------------------------------------------------------------ [2001-10-06 20:29:59] sniper@php.net Intented behaviour. Not a bug. ------------------------------------------------------------------------ [2001-10-06 15:41:15] sander@php.net is_null() evaluates true for non-existent variables. Consider the following snippet: unset($foo); if(is_null($foo)) echo 'true'; else echo 'false'; It outputs 'true'. Can this be fixed before 4.0.7? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13577&edit=1

« previous php.dev (#67482) next »