Php mongodb findOne return object?

is it possible to return the result of findOne as an object .. or does it always return an array?

I found something about mongo.objects = 1 by adding to php.ini .. but it didn't work for me.

can someone tell me more about this?

+3
source share
1 answer

I see no mention of the fact that the MongoDB PHP driver returns objects in the API documentation or in the tutorial. This is not surprising, since the official drivers remain next to the native bson document type used to represent documents.

, . PHP mongodb.org, , , , simplemongodb MongoDB-PHP-ODM. API, , , .

+4

Source: https://habr.com/ru/post/1746187/


All Articles