« Back
Written by Nuno Maduro on July 11, 2022

How to install PHP 8.2 RC on Mac

PHP 8.2 is scheduled to be released on the 24th of Nov, 2022. 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.2 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.2:

brew tap shivammathur/php

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

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

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

php -v

// PHP 8.2.0-dev (cli) (built: Jun 29 2022 00:22:19) (NTS)
// Copyright (c) The PHP Group
// Zend Engine v4.2.0-dev, Copyright (c) Zend Technologies
//    with Zend OPcache v8.2.0-dev, Copyright (c), by Zend Technologies

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.

I hope you have enjoyed this tutorial. If yes, please consider supporting my work — my mission is to spend more time maintaining the dozens of projects that I've written/collaborated on over the years and continue developing new projects to PHP development more productive and enjoyable.