>From the docs for empty(): "Note that this is meaningless when used on anything which isn't a variable; i.e. empty (addslashes ($name)) has no meaning since it would be checking whether something which isn't a variable is a variable with a FALSE value. "
Regards, Andrey Hristov ----- Original Message ----- From: "Holger Schopohl" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 28, 2001 11:15 AM Subject: [PHP-DEV] if (empty(trim('x'))) == parse error? > Hi, > > why php results a parse error on this expression? > > if (empty(trim('x'))) echo "Hello"; > > the statement works fine: > $x=trim('x'); > if (empty($x)) echo "Hello"; > > it is not really logically. > > Regards, > > Holger > > -- > PHP Development 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 Development 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]