PHP 8.4.0 RC4 available for testing

MongoDB\BSON\Document::fromPHP

(mongodb >=1.16.0)

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

说明

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

参数

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.

返回值

Returns a new MongoDB\BSON\Document instance.

错误/异常

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top