Home>Article>Backend Development> What is the difference between php mongo and mongodb

What is the difference between php mongo and mongodb

青灯夜游
青灯夜游 Original
2021-05-10 11:47:46 2366browse

Difference: 1. The classes and interfaces provided by mongo and mongodb extensions are completely different. 2. The mongo extension has been abandoned and does not support PHP7; the mongodb extension supports PHP7, and feature support for new versions of MongoDB is constantly being added.

What is the difference between php mongo and mongodb

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

When learning MongoDB, there is no way around it The first part is to use the driver to connect to MongoDB resources and perform operations such as additions, deletions, modifications, and queries. The most common way to connect to a drive is through PHP. When you choose to install the Mongo extension, you will find that the official provides two mongo and mongodb.

The difference between PHP's mongo and mongodb extensions

The classes and interfaces provided by the two extensions are completely different, haha. For example: some query operations using mongo originally returned an array, but in mongodb it was changed to the form of cursor reading.

  • mongo This extension has been abandoned, but bugs and security issues will continue to be fixed. PHP7 is not supported

  • mongodb supports PHP7, At the same time, the new version of MongoDB is constantly being added to support features

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What is the difference between php mongo and mongodb. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn