Re: Re: Detecting if a null variable exists?

From: Date: Mon, 14 Jun 2010 11:45:42 +0000
Subject: Re: Re: Detecting if a null variable exists?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-48771@lists.php.net to get a copy of this message
php -r 'function f(){$f=null; var_dump(array_key_exists("f", get_defined_vars()));} f();'
So, two function calls? That is not a solution to simply check if a variable has been created. You are creating an array and operating on said array. It should be a language construct. Why use an array function to decide something about a non-array variable? Brian. -------- http://brian.moonspot.net/

« previous php.internals (#48771) next »