title: Can a MongoDB objectid contain only numbers?
body: <p>Can a MongoDB objectid contain only numbers?</p>
  
  <p>There is a piece of code in a library that i'm using that does the following:</p>
  
  <pre><code>if (is_int($mixed) || ctype_digit($mixed)) {
      return;
  }
  </code></pre>
  
  <p>And as a result it is throwing away a record in my DB with an ObjectId of '512417805115179054000022' because it only contains numbers.</p>
  
  <p>Every other record has an ObjectId containing at least one alpha char such as '51241740511517a25b000017'</p>
  
  <p>Is this a problem with the function that it assumes an ObjectId <strong>can never</strong> contain only numbers when it is in fact possible, or is it some lower level issue with a driver or something that has created an ObjectId with only numeric chars in error?</p>