title: Generate an integer bigger than 2,147,483,647 in PHP
body: <p>I'm trying to make an API for my C# project in PHP to store users, but my problem is that my u_id (user id) doesn't go above <code>2,147,483,647</code>. I get the error "duplicate found..." in SQL because I set it as unique, and all id's becomes <code>2,147,483,647</code> because it doesn't go above it. I've tried to force it into appending each number as a string onto a variable but that doesn't seem to work. (there are no errors with the code)</p>
  
  <pre><code>&lt;?php
  
      class f {
  
          public static function randInt($length = 18) {
              $output = array(rand(1, 9));
              $return = "";
  
              for($i = 0; $i &lt; $length; $i++) {
                  $output[] = (string)mt_rand(0, 9);
              }
  
              for($j = 0; $j &lt; count($output); $j++) {
                  $return .= (string)$output[$j];
              }
  
              return $return;
          }
  
      }
  
  ?&gt;
  </code></pre>