|
MongoDB\BSON\Document::toPHPReturns the PHP representation of the BSON document Description
final public arrayobject MongoDB\BSON\Document::toPHP(arraynull
$typeMap = null )
Unserializes the BSON document to its PHP representation. The
Warning
BSON documents can technically contain duplicate keys because documents are stored as a list of key-value pairs; however, applications should refrain from generating documents with duplicate keys as server and driver behavior may be undefined. Since PHP objects and arrays cannot have duplicate keys, data could also be lost when decoding a BSON document with duplicate keys. Parameters
Return ValuesThe decoded PHP value.
Errors/Exceptions
See Also
|