note 32726 added to control-structures
| From: | Peter at rack1 dot php dot net | Date: | Thu, 05 Jun 2003 09:28:28 +0000 |
| Subject: | note 32726 added to control-structures | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49779@lists.php.net to get a copy of this message | ||
The above situation [if($c == ($a || $b))...] looks to me like it is evaluating the brackets [ie
if($a || $b)] and comparing that to $c. ($a || $b) will return true because one or the other or both
are set, and comparing $c to true will also return true.
Does that make sense? Good
----
Manual Page -- http://www.php.net/manual/en/control-structures.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32726
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32726&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32726&report=yes