note 19515 added to language.operators.logical

From: Date: Fri, 01 Mar 2002 15:11:24 +0000
Subject: note 19515 added to language.operators.logical
Groups: php.notes 
Request: Send a blank email to php-notes+get-27229@lists.php.net to get a copy of this message
The post of 14-Oct-1999 04:09 about operator precedence is incorrect. When I run the second example $choice1 = ""; $choice2 = "dog"; $default = "other"; $val = $choice1 or $choice2 or $default; Then $val is "", since the expression is equivilent to ($val = $choice1) or $choice2 or $default; To get $val to be "dog" use: $val=$choice1 or $val=$choice2 or $val=$default; which is equivilent to ($val=$choice1) or ($val=$choice2) or ($val=$default); -- http://www.php.net/manual/en/language.operators.logical.php http://master.php.net/manage/user-notes.php?action=edit+19515 http://master.php.net/manage/user-notes.php?action=delete+19515 http://master.php.net/manage/user-notes.php?action=reject+19515

« previous php.notes (#27229) next »