| MongoDB\BSON\fromJSONReturns the BSON representation of a JSON value Warning
    This function has been DEPRECATED as of extension version 1.20.0 and was removed in 2.0. Applications should use MongoDB\BSON\Document::fromJSON instead. Description
   string MongoDB\BSON\fromJSON(string  $json)Converts an » extended JSON string to its BSON representation. Parameters
 Return ValuesThe serialized BSON document as a binary string. Errors/Exceptions
 Changelog
 
 ExamplesExample #1 MongoDB\BSON\fromJSON example The above example will output: 
object(stdClass)#2 (1) {
  ["_id"]=>
  object(MongoDB\BSON\ObjectId)#1 (1) {
    ["oid"]=>
    string(24) "563143b280d2387c91807965"
  }
}
See Also
 |