Edit report at https://bugs.php.net/bug.php?id=60944&edit=1
ID: 60944 Updated by: larue...@php.net Reported by: lampacz+php at gmail dot com Summary: Unable to detect if variable exists vs. is null Status: Open Type: Feature/Change Request Package: Variables related Operating System: Linux PHP Version: 5.3.9 Block user comment: N Private report: N New Comment: <?php $a = null; var_dump(array_key_exists('a', get_defined_vars())); //or $GLOBALS ?> Previous Comments: ------------------------------------------------------------------------ [2012-02-01 08:05:10] lampacz+php at gmail dot com Description: ------------ There is no difference between $x = NULL and unset($a). So i'm unable to detect if variable was defined (so it can be defined and be filled with null) http://www.php.net/manual/en/types.comparisons.php Table Comparisons of $x with PHP functions, rows 2 - 4 gives same results Expected result: ---------------- Different results for undefined variables and null variables ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60944&edit=1