Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ / /
PHP Library Manual
/

Compatibility

The following compatibility table specifies the recommended version or versions of the MongoDB PHP Library and extension that you can use with a specific version of MongoDB.

The first column lists the version of the library and extension.

Important

MongoDB ensures compatibility between the MongoDB Server and the drivers for three years after the server version's end of life (EOL) date. To learn more about the MongoDB release and EOL dates, see MongoDB Software Lifecycle Schedules.

Icon
Explanation

All features are supported.

The driver version will work with the MongoDB version, but not all new MongoDB features are supported.

The driver version will not work with the MongoDB version. Attempting to connect to the MongoDB version will result in errors.

No mark

The driver version is not tested with the MongoDB version.

PHP Driver Versions
MongoDB 8.0
MongoDB 7.0
MongoDB 6.0
MongoDB 5.0
MongoDB 4.4
MongoDB 4.2

ext + lib 1.20 to 2.1

ext + lib 1.16 to 1.19

ext + lib 1.15

For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.

The following compatibility table specifies the recommended version or versions of the MongoDB PHP Library and extension that you can use with a specific version of PHP.

The first column lists the version of the library and extension.

PHP Driver Versions
PHP 8.4
PHP 8.3
PHP 8.2
PHP 8.1
PHP 8.0
PHP 7.4
PHP 7.3
PHP 7.2

ext + lib 1.21 to 2.1

ext + lib 1.20

ext + lib 1.17 to 1.19

ext + lib 1.16

ext + lib 1.15

Note

32-bit Environments

Due to potential problems representing 64-bit integers on 32-bit platforms, users are advised to use 64-bit environments. When using a 32-bit platform, be aware that any 64-bit integer read from the database will be returned as a MongoDB\BSON\Int64 instance instead of a PHP integer type.

For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.

If you have questions about compatibility, visit the following resources for further guidance:

Back

Release Notes

On this page