The strange ways of the "or" in PHP
<p>PHP's <code>or</code> is an weird keyword. Here it is in a code snippet that makes me confused:</p>

<pre><code>echo 0 or 1; // prints 1

$foo = (0 or 1);
echo $foo; // prints 1

$foo = 0 or 1;
echo $foo; // prints 0 for some reason
</code></pre>

<p>Why does the last one print 0 and not 1?</p>
