|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-02-01 08:05 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
<?php $a = null; var_dump(array_key_exists('a', get_defined_vars())); //or $GLOBALS ?>