Longhorn PHP 2025 - Call For Papers

MongoDB\BSON\Document::fromPHP

(mongodb >=1.16.0)

MongoDB\BSON\Document::fromPHPConstruct a new document instance from PHP data

Description

final static public MongoDB\BSON\Document::fromPHP(object|array $value): MongoDB\BSON\Document

Parameters

value (object|array)

A PHP object or array containing the document. When passing an array with numeric keys, the numeric values are converted to strings and used as document keys.

Return Values

Returns a new MongoDB\BSON\Document instance.

Errors/Exceptions

See Also

add a note

User Contributed Notes

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant