Because $a=5 is not 'empty'.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-----Original Message-----
From: bob [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what is the difference between function and language
construct?

why this get wrong?

<?php

if (empty($a=5)) {
        echo 'ok';
} else {
        echo 'bad';
}
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to