Testing PHP 8 With Docker

PHP 8 Beta 1 Announcement

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.

Are you already testing on PHP 8?

About Colin O'Dell

Colin O'Dell

Colin O'Dell is a Senior Software Engineer at SeatGeek. In addition to being an active member of the PHP League and maintainer of the league/commonmark project, Colin is also a PHP docs contributor, conference speaker, and author of the PHP 7 Migration Guide.