title: How to get Long 19 digits random numbers at PHP?
body: <p>So I need to make unique purchase number of mobile game. Each user's buying of in-app-purchase item record should be attached by unique long type 19 digits numbers from php code and stored to mysql DB.</p>
  
  <p>But how can I actually make random 19 digits numbers?</p>
  
  <p>I tried like this but errors.</p>
  
  <pre><code>$num_str = sprintf("%19d", mt_rand(1, 9999999999999999999));
  </code></pre>