MongoId::__construct Creates a new id &reftitle.description; public MongoId::__construct stringid&null; &reftitle.parameters; id A string to use as the id. Must be 24 hexidecimal characters. &reftitle.returnvalues; Returns a new id. &reftitle.changelog; &Version; &Description; 1.4.0 An exception is thrown when passed invalid string &reftitle.examples; <function>MongoId::__construct</function> example This example shows how to create a new id. This is seldom necessary, as the driver adds an id to arrays automatically before storing them in the database. ]]> &example.outputs.similar; Parameter example This example shows how to use a string parameter to initialize a MongoId with a given value. ]]> &example.outputs.similar; &reftitle.seealso; MongoId::__toString MongoId::isvalid