1.2.1552. ext/mongodb¶
Extension MongoDb.
Do not mistake with extension Mongo, the previous version.
Mongodb driver supports both PHP and HHVM and is developed atop the libmongoc and libbson libraries.
<?php
require 'vendor/autoload.php'; // include Composer's autoloader
$client = new MongoDB\Client("mongodb://localhost:27017");
$collection = $client->demo->beers;
$result = $collection->insertOne( [ 'name' => 'Hinterland', 'brewery' => 'BrewDog' ] );
echo "Inserted with Object ID '{$result->getInsertedId()}'";
?>
See also MongoDB driver and MongdDb.
1.2.1552.1. Specs¶
Short name |
Extensions/Extmongodb |
Rulesets |
|
Exakat since |
0.9.5 |
PHP Version |
With PHP 7.0 and more recent |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |