PHP8 Support in the MongoDB PHP driver

The long awaited arrival of PHP8 is here! On November 26, 2020, PHP developers will receive a new major version, with exciting new features like JIT compiler, union types, and attributes. The last major version, 7.0, was released almost exactly five years ago, in December of 2015.

MongoDB is happy to announce that we have built out support for PHP8 in our latest version of the PHP driver. Worthy mentions for driver version 1.8.0:

  • PHP 8 support
  • Like, that’s it
  • Seriously, PHP 8 support. Go upgrade!

No big release would be complete without a little drama, but we were still surprised to hear Microsoft was killing off support for PHP builds on Windows. PHP is the dominant programming language of the internet itself, there are still plenty of students learning PHP in the world. Per the SO developer survey of 2020, 46.77% of PHP developers use Windows as their operating system, with only 28.6% on Linux. The PHP release manager, Sara Golemon, assured the community there was no reason to fret on this thread on github, and another community member has already taken over this critical task.

Thanks again to the PHP community for using MongoDB, and let us know if you have any questions.

Rachelle

5 Likes

So (of course) @Rachelle the new driver also still supports PHP 7?

Hi @Jack_Woehr,

Yes, the MongoDB PHP Driver v1.8 supports PHP 7 and 8. The driver has two components: the high-level end user API provided by the MongoDB PHP library (v1.8.0) and the low-level mongodb PHP extension (v1.9.0) that this library builds on.

The documentation includes tables for Language Compatibility and MongoDB Compatibility if you want to confirm supported combinations of PHP driver, PHP language, and MongoDB server versions.

The latest PHP 1.8 driver is listed with both component versions: ext 1.9 + lib 1.8.

Regards,
Stennie

Installed and working, thanks.