How to Upgrade to PHP 8.2 on MacOS with Homebrew
A no-frills guide
Written by Chris Arter | Published onA no-frills guide
Written by Chris Arter | Published onHere is a simple guide to installing or upgrading to PHP 8.2 on MacOS with Homebrew.
It’s good to make sure Homebrew itself is up to date before we install anything else. To do that we’ll run:
brew update
Next, we’ll install PHP.
brew tap shivammathur/php
brew install shivammathur/php/[email protected]
Lastly, we’ll want to tell our machine which version to use:
brew link --overwrite --force [email protected]
The repo for this install is available here: https://github.com/shivammathur/homebrew-php
To verify our install, open a new terminal window and run:
php -v
That should show you running php 8.2
🥳