Solved.

empty, isset and unset are not functions, they are language contructs,
which results in the error.  This makes sense, a workaround is creating
functions like isEmpty (or something similar) and using them.  I'll be
submitting a future request soon ;)

Thanks everyone, especially OpenSrc in #php

regards,
Philip

<snip>

> > <?php
> > 
> >   // works
> >   if (empty($var)) print '$var is empty<br>';
> >   
> >   // works
> >   $foo = 'is_string';
> >   $var = 'abcdef';   
> >   if ($foo($var)) print '$var is a string<br>';
> >   
> >   // works
> >   $foo = 'strlen';
> >   $var = 'abcdef';
> >   if ($foo($var) > 5) print '$var is over 5 chars<br>';
> >   
> >   // 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?



-- 
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]

Reply via email to