MongoId::__construct
Creates a new id
&reftitle.description;
MongoId::__construct
stringid&null;
&reftitle.parameters;
id
A string to use as the id.
&reftitle.returnvalues;
Returns a new id.
&reftitle.examples;
MongoId::__construct 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;
Note that the second hexidecimal number is greater than the first.
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