[PHP-DOC] Bug #13577 Updated: is_null evaluates true for non-existent variables From: sander <email protected>
Date: 10/07/01

ID: 13577
Updated by: sander
Reported By: sander <email protected>
Old Status: Bogus
Status: Open
Old Bug Type: Variables related
Bug Type: Documentation problem
Operating System: Win2K & Debian Linux
PHP Version: 4.0.6
New Comment:

If it's intended, then it should be documented.
Reopened as a documentation problem.

Previous Comments:
------------------------------------------------------------------------

[2001-10-06 20:29:59] sniper <email protected>

Intented behaviour. Not a bug.

------------------------------------------------------------------------

[2001-10-06 15:41:15] sander <email protected>

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