PHP - Lenght of a number containing 0's to the left
<p>I'm trying to validate a number by it's length. This number has to have 4 digits so it passes the validation. The problem is when this number has 0's to it's left, like 0035.</p>

<p>Right now i'm at this:</p>

<pre><code>echo (strlen ((string) 0025  ));
</code></pre>

<p>Which gives a total of 2, but i want this to count the 0's to it's left, so it gives me a total of 4.
Clearly the cast of the integer to string is not working, how can i do this?</p>
