Re: variable functions: empty/isset/unset invalid?

From: Date: Mon, 07 May 2001 18:53:24 +0000
Subject: Re: variable functions: empty/isset/unset invalid?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51797@lists.php.net to get a copy of this message
On Monday 07 May 2001 20:11, Johnson, Kirk wrote: > problem for empty(). Also, a User Contributed Note at > > http://www.php.net/manual/en/functions.php#functions.user-defined > has > this to say: > > <quote> > there are tons of good uses for this sort of functionality. But it > should be noted that this will not work with > include() > include_once() > require() > require_once() > > it's safe to assume that this is for safty. > </quote> But I see no reason why it shouldn't work with empty() and isset() (unset() might be justified perhaps). You should report it as bug, Philip. > > // doesn't work : Fatal Error : Call to undefined function: empty() > > // same with isset() and unset() > > $foo = 'empty'; > > if ($foo($var)) print '$var is empty'; > > > > ?> > > > > In otherwords, only these few functions aren't working as "variable > > functions" but result in a "Fatal Error" instead. Why? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Error 032: Recursion error - see error 032

« previous php.general (#51797) next »