How to Install PHP 7.0 / 7.1 using HomeBrew on Mac Big Sur

Although PHP released its latest version i.e. v 8 , You might be working on a project that is using the old version of PHP i.e either version 7.0 or version 7.1 which is not supported by HomeBrew by default.

On my M1 Mac which comes with OSX Big Sur. I installed the default PHP version 7.3 using HomeBrew but for one of the project which is using Laravel v 5.4 I had to install PHP 7.0 on my Mac.

Here is how I installed it

brew tap exolnet/homebrew-deprecated
brew install php@7.1

Now in order switch it to version 7.0 from 7.3 here is what you can do

Livewire Component Library
brew unlink php@7.3
brew link php@7.1

Site Footer