|
MongoDB\BSON\PackedArray::fromJSONConstruct a new BSON array instance from a JSON string 説明
final static public MongoDB\BSON\PackedArray MongoDB\BSON\PackedArray::fromJSON(string
$json )Converts an » extended JSON string to its BSON representation. パラメータ
戻り値Returns a new MongoDB\BSON\PackedArray instance. エラー / 例外
例例1 MongoDB\BSON\PackedArray::fromJSON example
上の例の出力は以下となります。 object(MongoDB\BSON\PackedArray)#1 (2) { ["data"]=> string(68) "MQAAAAIwAAQAAABmb28AEDEAewAAABIyAP////8AAAAABzMAVjFafGEY/RuSAnCxAA==" ["value"]=> array(4) { [0]=> string(3) "foo" [1]=> int(123) [2]=> int(4294967295) [3]=> object(MongoDB\BSON\ObjectId)#2 (1) { ["oid"]=> string(24) "56315a7c6118fd1b920270b1" } } } 参考
|