Bug #13577 Updated: is_null evaluates true for non-existent variables
| From: | mfischer@php.net | Date: | Mon, 10 Jun 2002 09:15:48 +0000 |
| Subject: | Bug #13577 Updated: is_null evaluates true for non-existent variables | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-9996@lists.php.net to get a copy of this message | ||
ID: 13577
Updated by: mfischer@php.net
Reported By: sander@php.net
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Win2K & Debian Linux
PHP Version: 4.0.6
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2001-10-07 09:57:05] jeroen@php.net
An uninitialized variable equals NULL. So it _is_ null.
This should be in the language.types.null section.
------------------------------------------------------------------------
[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