MongoDB\BSON\Timestamp::__toString
PHP function
Edit on GitHub ✎
(mongodb >=1.0.0)
Returns the string representation of this Timestamp
Description
MongoDB\BSON\Timestamp::__toString(): string
Parameters Parameters
Return Values
Returns the string representation of this Timestamp.
Examples
MongoDB\BSON\Timestamp::__toString() example
php
<?php
$timestamp = new MongoDB\BSON\Timestamp(1234, 5678);
var_dump((string) $timestamp);
?>The above example will output something similar to:
output
string(11) "[1234:5678]"See Also
- BSON Types: Timestamps