Skip to content
C PHP Groff Shell JavaScript Python Batchfile
Latest commit 51707d8 @jmikola jmikola Merge pull request #217
Failed to load latest commit information.
.travis.scripts PHPC-496: Revert "Temporary workaround for warning in mongoc"
bin Encode special characters in commit messages for package.xml
docs Remove Manager::executeInsert() usage in ODS docs
scripts Accept MongoDB 3.2 package repo public keys on test VM
src Fixed PHPC-543: MongoDB\BSON\UTCDateTime on 32 bit platforms parse ar…
tests PHPC-515: Test that negative cursor limits return one batch
win32 Fix windows bson config
.gitignore Added some more phpt test leftovers to .gitignore
.gitmodules We are tracking 1.2.0-dev, not master! Add travis and coveralls support
.travis.yml Enable PHP7 on Travis HHVM-136: Make hippo and phongo README/CONTRIBUTING files consistent
LICENSE Add Apache 2 license
Makefile.frag Revise prep-release.php handling Remove "beta" in doc.
RELEASE-0 PHPC-366: Merge RELEASE-0.* release notes into RELEASE-0
RELEASE-1.0 Add 1.0.0 release notes
RELEASE-1.1 Add 1.1.2 release notes
Vagrantfile PHPC-279: Add 2.4 (and 2.6) to build matrix and ensure test suite com…
composer.json PHPC-247: Remove 'faker' as prerequisite from running our full test s…
config.m4 Improve other config.m4 check messages
config.w32 PHP7: Start a phongo_compat.c with things that shouldn't be done in h…
mkdocs.yml Update GitHub URLs for org change and repo rename
phongo_compat.c PHPC-405: zval drop a level; zval*->zval, zval**->zval*
phongo_compat.h PHPC-527: fix call to add_index_stringl
php_bson.h PHPC-529: Prefix BSON functions to avoid symbol conflicts
php_phongo.c PHPC-529: Prefix BSON functions to avoid symbol conflicts
php_phongo.h Back to -dev
php_phongo_classes.h Fixed issues with PHP 7 and the new ReadConcern
php_phongo_structs-5.h Fixed issues with PHP 7 and the new ReadConcern
php_phongo_structs-7.h Fixed issues with PHP 7 and the new ReadConcern

pecl/mongodb (MongoDB driver for PHP)

Build Status Coverage Status

This is the low-level PHP driver for MongoDB. The API is the same as the HHVM driver for MongoDB. The documentation for both of them is the same, and can be found at

The driver is written to be a bare bone layer to talk to MongoDB, and therefore misses many convenience features. Instead, these convenience methods have been split out into a layer written in PHP, the MongoDB Library. Using this library should be your preferred way of interacting with MongoDB.

Please note that the new HHVM and PHP drivers implement a different API from the legacy driver at; therefore existing libraries that use the legacy driver (e.g. Doctrine MongoDB's ODM) will not work with the new drivers.

In the long run, we hope that userland packages will be built atop this driver to implement various APIs (e.g. a BC layer for the existing driver, new fluent interfaces), management utilities (for creating admin utilities and cluster management applications), and other interesting libraries.



To build and install the driver:

$ pecl install mongodb
$ echo "" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

We recommend using this extension in conjunction with our userland library, which is distributed as mongodb/mongodb for Composer.



Related Projects

Something went wrong with that request. Please try again.