$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:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 1:04 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]