note 31609 deleted from language.operators by sniper

From: Date: Mon, 13 Oct 2003 00:05:24 +0000
Subject: note 31609 deleted from language.operators by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58367@lists.php.net to get a copy of this message
Note Submitter: wikiz@studentas.lt ---- 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.

« previous php.notes (#58367) next »