note 29789 added to language.expressions
| From: | stian at datanerd dot net | Date: | Tue, 25 Feb 2003 08:37:02 +0000 |
| Subject: | note 29789 added to language.expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44492@lists.php.net to get a copy of this message | ||
The short-circuit feature is indeed intended, and there are two types of evaluators, those who DO
short-circuit, and those who DON'T, || / && and | / & respectively.
The latter method is the bitwise operators, but works great with the usual boolean values ( 0/1 )
So if you don't want short-circuiting, try using the | and & instead.
Read more about the bitwise operators here:
http://www.php.net/manual/en/language.operators.bitwise.php
--
http://www.php.net/manual/en/language.expressions.php
http://master.php.net/manage/user-notes.php?action=edit+29789
http://master.php.net/manage/user-notes.php?action=delete+29789
http://master.php.net/manage/user-notes.php?action=reject+29789