array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'mongodb-bson-objectid.tostring.php', 1 => 'MongoDB\\BSON\\ObjectId::__toString', 2 => 'Returns the hexidecimal representation of this ObjectId', ), 'up' => array ( 0 => 'class.mongodb-bson-objectid.php', 1 => 'MongoDB\\BSON\\ObjectId', ), 'prev' => array ( 0 => 'mongodb-bson-objectid.jsonserialize.php', 1 => 'MongoDB\\BSON\\ObjectId::jsonSerialize', ), 'next' => array ( 0 => 'class.mongodb-bson-regex.php', 1 => 'MongoDB\\BSON\\Regex', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/bson/objectid/tostring.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(mongodb >=1.0.0)
MongoDB\BSON\ObjectId::__toString — Returns the hexidecimal representation of this ObjectId
У цієї функції немає параметрів.
Returns the hexidecimal representation of this ObjectId.
Приклад #1 MongoDB\BSON\ObjectId::__toString() example
<?php
var_dump((string) new MongoDB\BSON\ObjectId());
var_dump((string) new MongoDB\BSON\ObjectId('000000000000000000000001'));
?>
Поданий вище приклад виведе щось схоже на:
string(24) "56731b49da14d8747d701211" string(24) "000000000000000000000001"