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
When you will see logs that look like this: Go to the localhost:8000, you should see this: Now you can edit the app/public/index.php file and test php8 features: