Having recently updated Homebrew we realised they have dropped support for PHP 5.6 and 7.0. Even though we agree fully with getting on the latest versions, some times we are forced to use older versions. With brew dropping support we had to find a new way.
Using exolnet/homebrew-deprecated we can now use these versions.
Make sure you watch out for any existing installs of PHP and clean them up first.
Simply tap the keg from exolnet via:
brew tap exolnet/homebrew-deprecated
Then install either:
brew install [email protected]
or
brew install [email protected]
Now follow the instructions to update your $PATH with the new version of PHP e.g.
echo ‘export PATH=”/usr/local/opt/[email protected]/bin:/usr/local/opt/[email protected]/sbin:$PATH”‘ >> ~/.bash_profile
NOTE depending on the current state of your .bash_profile file you might have to add this update manually.
Finally reload your profile to the current terminal session via:
source ~/.bash_profile
Comments are closed.