note 31609 added to language.operators

From: Date: Mon, 28 Apr 2003 07:25:50 +0000
Subject: note 31609 added to language.operators
Groups: php.notes 
Request: Send a blank email to php-notes+get-47190@lists.php.net to get a copy of this message
Correct me if I'm wrong, but.. Documentation states that assignment has lower precedence than, for example, sum (+) operator. but this example shows that assignments go BEFORE the sum: $a = 10 + $b=10; echo "a=$a, b=$b"; outputs: a=20, b=10 I guess, php is evaluating everything in this sequence: a = (10+($b=10)); though by precedence table this should be: a = ((10+$b) = 10); ..so it means that assignment has higher precedence against sum operator. -- http://www.php.net/manual/en/language.operators.php http://master.php.net/manage/user-notes.php?action=edit+31609 http://master.php.net/manage/user-notes.php?action=delete+31609 http://master.php.net/manage/user-notes.php?action=reject+31609

« previous php.notes (#47190) next »