PHP ternary statement using 'and'
<p>Ok so I just realized some wierd behavior with PHP and would like to know why this happens. So running this code:</p>

<pre><code> var_dump( true and false ? 'one' : 'two' );
</code></pre>

<p>Outputs </p>

<pre><code>boolean true
</code></pre>

<p>instead of 'two' as you would expect... The problem appears to be using 'and'.</p>

<p>Running:</p>

<pre><code>var_dump( true &amp;&amp; false ? 'one' : 'two' );
</code></pre>

<p>outputs </p>

<pre><code>string 'two' (length=3)
</code></pre>

<p>just as expected. Why does using 'and' instead of '&amp;&amp;' cause this weird behavior? Are they not supposed to be the same?</p>
