title: PHP equivalent of javascript Math.random()
body: <p>I need a PHP function that generates random number identical to javascript Math.random() with the same seed. </p>
  
  <p>MDN about math.random():</p>
  
  <blockquote>
    <p>The random number generator is seeded from the current time, as in
    Java.</p>
  </blockquote>
  
  <p>As far I tried the PHP's rand() generates something like that:</p>
  
  <pre><code>srand( time() ); // I use time as seed, like javascript does
  echo rand();
  Output: 827382
  </code></pre>
  
  <p>And javascript seems to generate random numbers on it's own way:</p>
  
  <pre><code>Math.random(); Output: 0.802392144203139
  </code></pre>
  
  <p>I need PHP code that is equivalent for math.random(), not new javascript code. I can't change javascript.</p>