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