Testing PHP 8 With Docker

Written by - Blog / Original link on Aug. 6, 2020

The first beta release of PHP 8 is here!

We're now one step closer to the scheduled release of PHP 8.0.0 stable on November 26th. Developers looking to get a head-start on testing their applications (or just looking to play with the new features) can easily use Docker to start testing today.

The official PHP Docker image has a number of tags to choose from, including ones for pre-release versions of PHP like 8.0.0beta1. If you want to test against the latest beta or RC release, use any of these tags:

If you want to play around on PHP's CLI, simply run:

docker run -it --rm php:8.0-rc

Or perhaps you have a website you'd like to test with:

docker run -v `pwd`:/var/www/html php:8.0-rc-apache

And of course you can extend the base PHP image to install PHP extensions, MySQL, or anything else you need for testing.

Regardless of how you want to take PHP 8 for a spin, Docker makes it super simple to get started today.


« I'm Partnering with NordVPN as a Strategic Advisor - I'm Open Sourcing the Have I Been Pwned Code Base »