How to test PHP8 on MAC OS

igorrebega
Nov 16, 2020

--

If you want to test out the new feature of php8 on MAC OS, you can always build the PHP from the sources.

But I propose a quicker and more secure(isolated) method that won’t change your system.

We are gonna use the docker, so please install it.

After that clone this repo to your machine, https://github.com/igorrebega/php8.0-docker

Go to the docker folder and run

docker-compose up

When you will see logs that look like this:

Go to the localhost:8000, you should see this:

localhost:8000

Now you can edit the app/public/index.php file and test php8 features:

--

--