How to install PHP 8.1 RC on Mac

How to install PHP 8.1 RC on Mac

PHP 8.1 is scheduled to be released on the 25th of Nov, 2021. Of course, meanwhile, you may test the new features, syntax changes, and other improvements in your local environment.

In this article, we are going to see how you can start playing with PHP 8.1 RC on your Mac. First, ensure that Brew is installed and up-to-date by running:

brew update

Next, install the repository of formulae that contains PHP 8.1:

brew tap shivammathur/php

Finally, install PHP 8.1 and start using it by running:

brew install php@8.1
brew link --overwrite --force php@8.1

You may now double-check that you are indeed using PHP 8.1 by running:

php -v

// Should output something like: 
// PHP 8.1.0RC2-dev (cli) (built: Sep  3 2021 00:37:11)

Of course, help the PHP development team by reporting any issues found in the bug reporting system. And please, do not use this version in production.

Did you enjoy this article? Consider supporting my work:

Sponsor @nunomaduro on GitHub Sponsors
Created Pest, Laravel Zero, Collision, Larastan, PHP Insights, and more.
Show Comments