in PHP documentation is written, that operators
= += -= *= /= .= %= &= |= ^= ~= <<= >>=
have associativity LEFT. For example
Code: Select all
$x = 1;
$y = 2;
$z = 3;
$x = $y = $zHowever, it's not mistake in documentation, in PHP source is '=' marked also as LEFT associative.
Can anybody tell me how exactly $x = $y = $z (and $x += $y += $z etc.) works? I know that finally $x and $y have the same value as $z
Thanks, Pavel.