strange behavior: ( 0 == "string") is true| switch(0){} gives the first case 'case "a": '
<p>How can <a href="http://codepad.org/f8q6zNrF" rel="nofollow">this</a> happen?</p>

<pre><code>var_dump(0=="some string"); // yields true, why?
</code></pre>

<p><sup></sup></p>

<pre><code>switch(0) {
  case "a":
    echo "a"; // &lt;-- we get here, why?
    break;  

  case "b":
    echo "b";
    break;   

  default:
    echo "def";
    break;
} 
</code></pre>

<hr>

<p>according to this</p>

<pre><code>0=="some string"
0==(int)"some string"
0==0
true
</code></pre>

<p>this also would logical:</p>

<pre><code>        0=="some string"
(string)0=="some string"
      "0"=="some string"
       false
</code></pre>
