[PHP-DEV] if (empty(trim('x'))) == parse error?

2001-11-28 Thread Holger Schopohl
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

Re: [PHP-DEV] if (empty(trim('x'))) == parse error?

2001-11-28 Thread 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

Re: [PHP-DEV] if (empty(trim('x'))) == parse error?

2001-11-28 Thread Balazs Nagy
Andrey Hristov wrote: 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. Maybe I am not so