Is it just me or are we missing a way in the language to check if a variable that has been set to NULL exists or not?

is_null() on an unset variable throws a NOTICE.
$var === null throws a notice.

So, you have to use isset()? But, ah,

$var = null;
if(isset($var))

yields false.

Is array_key_exists("var", $GLOBALS) the only solution to this problem? Seems silly.

perhaps an var_exists() function is needed to fill this hole?
        
--

Brian.
--------
http://brian.moonspot.net/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to