Operators precedence
<p>Found some interesting code snippet today. Simplified, it looks like this:</p>

<pre><code>$var = null;

$var or $var = '123';

$var or $var = '312';

var_dump($var);
</code></pre>

<p>The thing is that, as i know, <a href="http://www.php.net/manual/en/language.operators.precedence.php" rel="nofollow">precedence of assignment is higher that <code>OR</code></a>, so, as i assume, <code>var_dump</code> should output <code>312</code> (first - assign, second - compare logically). But result is defferent, i getting <code>123</code> (first - check if <code>$var</code> converting to <code>true</code>, second - if not, assign value).
The questions is how does it work? Why behavior is the same for <code>or</code> and <code>||</code>?</p>
