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