MongoDB\BSON\ObjectId::__construct Construct a new ObjectId &reftitle.description; final public MongoDB\BSON\ObjectId::__construct stringid &reftitle.parameters; id (string) A 24-character hexadecimal string. If not provided, the driver will generate an ObjectId. &reftitle.errors; &mongodb.throws.argumentparsing; Throws MongoDB\Driver\Exception\InvalidArgumentException if id is not a 24-character hexadecimal string. &reftitle.examples; <function>MongoDB\BSON\ObjectId::__construct</function> example ]]> &example.outputs.similar; string(24) "56732d3dda14d81214634921" } object(MongoDB\BSON\ObjectId)#1 (1) { ["oid"]=> string(24) "000000000000000000000001" } ]]> &reftitle.seealso; ObjectId Reference BSON Types: ObjectId