update : 2015.11.03
php.shukuma.com검색:
|
MongoDB\BSON\toPHP(mongodb >=1.0.0) MongoDB\BSON\toPHP — Returns the PHP representation of a BSON value 설명
array|object MongoDB\BSON\toPHP
( string
$bson
[, array $typeMap = array()
] )
Unserializes a BSON document (i.e. binary string) to its PHP representation.
The 인수반환값The unserialized PHP value. 오류/예외Throws MongoDB\Driver\Exception\InvalidArgumentException if a class in the type map cannot be instantiated or does not implement MongoDB\BSON\Unserializable. Throws MongoDB\Driver\Exception\UnexpectedValueException if the input did not contain exactly one BSON document. Possible reasons include, but are not limited to, invalid BSON, extra data (after reading one BSON document), or an unexpected » libbson error. 예제Example #1 MongoDB\BSON\toPHP() example
<?php 위 예제의 출력: object(stdClass)#1 (1) { ["foo"]=> int(1) } 참고
|