PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\BSON\toPHP
request it (390)
GoLang replacement for PHP's MongoDB\BSON\toPHP
[edit | history]
MongoDB\BSON\toPHP(mongodb >=1.0.0) MongoDB\BSON\toPHP — Returns the PHP representation of a BSON value Description
array|object MongoDB\BSON\toPHP
( string
$bson
[, array $typeMap = array()
] )
Unserializes a BSON document (i.e. binary string) to its PHP representation.
The Warning
Fields containing deprecated BSON types (i.e. undefined, symbol, DBPointer) are represented only by bare-bones objects of the classes MongoDB\BSON\Undefined, MongoDB\BSON\Symbol, and MongoDB\BSON\DBPointer, when converting BSON to PHP. These objects are created from BSON data and used for storing these types back into the database, but can not be instantiated as they have a private constructor. Return ValuesThe unserialized PHP value. Errors/Exceptions
Changelog
ExamplesExample #1 MongoDB\BSON\toPHP() example
<?php The above example will output: object(stdClass)#1 (1) { ["foo"]=> int(1) } See Also
|
more
Recently updated
more
Most requested
more
Last requests
|