PHP rand(10000000000000,9999999999999) returning "-114888782"
<p>So, I have a PHP script:</p>

<pre><code>&lt;?
rand(1000000000000,9999999999999);
</code></pre>

<p>The expected result is a number with 13 digits.</p>

<p>But it's returning some weird numbers, as:</p>

<pre><code>987419207
1032717476
-455563764
</code></pre>

<p>Does anyone know what's going on?</p>

<hr>

<p>PHP: 5.2.17</p>

<p>OS: Tested on Debian Squeeze and Windows 7, both 64 bits</p>

<hr>

<h1>Solution (workaround)</h1>

<pre><code>&lt;?
echo rand(10000,99999).rand(10000000,99999999);
</code></pre>
