Skip to content
MongoDB PHP driver (experimental)
C PHP Groff Shell JavaScript Python Batchfile
Pull request Compare This branch is 20 commits behind mongodb:master.
Latest commit 94da547 @jmikola jmikola Merge pull request #202
Failed to load latest commit information.
.travis.scripts
bin Encode special characters in commit messages for package.xml
docs Its a bit creepy seeing my family in bug reports
scripts Accept MongoDB 3.2 package repo public keys on test VM
src
tests
win32 Fix windows bson config
.gitignore Added some more phpt test leftovers to .gitignore
.gitmodules
.llvm-cov.sh
.travis.yml
CONTRIBUTING.md HHVM-136: Make hippo and phongo README/CONTRIBUTING files consistent
CREDITS
LICENSE Add Apache 2 license
Makefile.frag
README.md Remove "beta" in doc.
RELEASE-0 PHPC-366: Merge RELEASE-0.* release notes into RELEASE-0
RELEASE-1.0
RELEASE-1.1
Vagrantfile
composer.json
config.m4
config.w32 PHP7: Start a phongo_compat.c with things that shouldn't be done in h…
mkdocs.yml
phongo_compat.c
phongo_compat.h
php_bson.h
php_phongo.c
php_phongo.h
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

README.md

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 http://docs.php.net/manual/en/set.mongodb.php

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 http://pecl.php.net/package/mongo; 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.

Documentation

Installation

To build and install the driver:

$ pecl install mongodb
$ echo "extension=mongodb.so" >> `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.

Contributing

See CONTRIBUTING.md

Related Projects

Something went wrong with that request. Please try again.