PHP - Manual: MongoDB\BSON\Document::fromBSON
2025-02-27
(mongodb >=1.16.0)
MongoDB\BSON\Document::fromBSON — Construct a new document instance from a BSON string
bson
(string)A string containing a document in BSON format.
Returns a new MongoDB\BSON\Document instance.
bson
is an invalid BSON string or contains more than a single document.官方地址:https://www.php.net/manual/en/mongodb-bson-document.frombson.php