Statement on glibc/iconv Vulnerability

MongoDB\BSON\Document::toPHP

(mongodb >=1.16.0)

MongoDB\BSON\Document::toPHPReturns the PHP representation of the BSON document

Beschreibung

final public MongoDB\BSON\Document::toPHP(?array $typeMap = null): array|object

Unserializes the BSON document to its PHP representation. The typeMap paramater may be used to control the PHP types used for converting BSON arrays and documents (both root and embedded).

Warnung

Da Dokumente als Liste von Schlüssel-Wert-Paaren gespeichert werden, können BSON-Dokumente technisch gesehen doppelte Schlüssel enthalten; Anwendungen sollten allerdings davon absehen, Dokumente mit doppelten Schlüsseln zu erzeugen, da das Verhalten von Server und Treiber undefiniert sein kann. Der Grund dafür ist, dass PHP-Objekte und -Arrays keine doppelten Schlüssel haben können, weshalb bei der Dekodierung eines BSON-Dokuments mit doppelten Schlüsseln Daten verloren gehen können.

Parameter-Liste

typeMap (array)

Konfiguration der Typzuordnung.

Rückgabewerte

The decoded PHP value.

Hinweis: When encountering a value encoded as 64-bit integer in the BSON document, the return value of this method will be a MongoDB\BSON\Int64 instance.

Fehler/Exceptions

Siehe auch

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top