note 21800 added to language.expressions
| From: | toreilly at cityspree dot com | Date: | Mon, 27 May 2002 18:30:10 +0000 |
| Subject: | note 21800 added to language.expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31078@lists.php.net to get a copy of this message | ||
I actually find the short-circuit aspect of expressions useful. As in:
if ($foo AND Bar()) { echo "OK"; }
where Bar() should only be run if $foo is set, and OK should only be printed if both evaluate to
TRUE.
My only concern is if this is the intended result in PHP. In other words, if I code this way will
it fail under later releases of PHP?
--
http://www.php.net/manual/en/language.expressions.php
http://master.php.net/manage/user-notes.php?action=edit+21800
http://master.php.net/manage/user-notes.php?action=delete+21800
http://master.php.net/manage/user-notes.php?action=reject+21800