title: How to create unique 6 to 8 digit code using php without replication
body: <p>I need create unique user id, which wont replicate at any cost. As, i am using this id to make user to login, and this also work as reference id. The id can be 6 to 8 of length. So far now, i have tried this </p>
  
  <pre><code> $v = mt_rand(10, 99);
   $b = date("s");
   $a = round(microtime(true));
   $c = substr($a, 8);
  </code></pre>
  
  <p>Will this create unique id ? And , am expecting user base would cross 10 millions. So need to without collision for more than 10 million records.</p>