RE: [PHP] variable functions: empty/isset/unset invalid?

From: Date: Mon, 07 May 2001 17:08:05 +0000
Subject: RE: [PHP] variable functions: empty/isset/unset invalid?
Groups: php.general 
Request: Send a blank email to php-general+get-51775@lists.php.net to get a copy of this message
$foo is a string not a PHP function which makes 'empty' a string and not a function/command. Am I missing something? oktay -----Original Message----- From: Philip Olson [mailto:philip@cornado.com] Sent: Monday, May 07, 2001 1:04 PM To: php-general@lists.php.net Subject: [PHP] variable functions: empty/isset/unset invalid? This does not work as expected (as I expect it at least) and gives the following error. This seems to result with use of empty(), isset(), and unset(), perhaps others : Call to undefined function: empty() When using : $foo = 'empty'; if ($foo($var)) print 'worked.'; Of course the following works as expected. if (empty($var)) print 'worked.'; And with other functions : $foo = 'somefunction'; if ($foo($var)) print 'worked.'; Why won't variable functions work with empty/isset/unset this way? And why the 'undefined function' fatal error? regards, philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#51775) next »