array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'mongodb-bson-binary.tostring.php', 1 => 'MongoDB\\BSON\\Binary::__toString', ), 'up' => array ( 0 => 'class.mongodb-bson-binary.php', 1 => 'MongoDB\\BSON\\Binary', ), 'prev' => array ( 0 => 'mongodb-bson-binary.serialize.php', 1 => 'MongoDB\\BSON\\Binary::serialize', ), 'next' => array ( 0 => 'mongodb-bson-binary.unserialize.php', 1 => 'MongoDB\\BSON\\Binary::unserialize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/bson/binary/tostring.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(mongodb >=1.2.0)
MongoDB\BSON\Binary::__toString — Returns the Binary's data
This method is an alias of: MongoDB\BSON\Binary::getData().
This function has no parameters.
Returns the Binary's data.
Example #1 MongoDB\BSON\Binary::__toString() example
<?php
var_dump((string) new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC));
?>
The above example will output:
string(3) "foo"