PHP string conversion rules
<p>What are the conversion rules for strings to ints in php?</p>

<p>For example i have the following that return 0:</p>

<pre><code>var_dump((int)"test0");
var_dump((int)"test1");
var_dump((int)"test2");
</code></pre>

<p>and it appears that if the string starts with a digit then it will trim the characters and use the digit part only. As follows...</p>

<pre><code>var_dump((int)"1test");
var_dump((int)"2test");
var_dump((int)"3test");
</code></pre>

<p>These return 1, 2 and 3 respectively.</p>

<p>Now, is this a definate rule, or are there exceptions to this?</p>
