title: Is rand() time-dependent in php?
body: <p>Let we explain what I mean.</p>
  
  <p>Some time ago, while writing a program in c#, I've made following mistake:</p>
  
  <pre><code>int Randomize()
  {
      Random r=new Random();
      return  r.Next(0,10);
  }
  </code></pre>
  
  <p>in c#, this is a mistake, because, called several  times in a row, this function will return the same value. This is because Random constructor uses time seed, and the time difference between calls was too low (took me an hour to find that one :) ).</p>
  
  <p>Now I'm using <code>rand(...)</code> in php, and I need for the output to always be different, even if 2 scripts are executed at the same time.</p>
  
  <p>Do I have to do something to get this result, or is it designed to work this way?</p>