PHP type-casting to boolean
<p>Can someone explain me why this:</p>

<pre><code>var_dump((bool) 1==2);
</code></pre>

<p>returns</p>

<pre><code>bool(true)
</code></pre>

<p>but </p>

<pre><code>var_dump(1==2);
</code></pre>

<p>returns</p>

<pre><code>bool(false)
</code></pre>

<p>Of course the second return is correct, but why in the first occasion php returns an unexpected value?</p>

<p>I use PHP 5.3.8 in Debian GNU/Linux.</p>

<p>Thanks</p>
