Created
July 1, 2021 11:32
-
-
Save thetwopct/fb0772620b0b7f319e48addcc6afd267 to your computer and use it in GitHub Desktop.
Change PHP version on MacOS with Home Brew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show php version i.e. 7.3.8 | |
php -v | |
# update brew to latest | |
brew update | |
# to show all php versions available i.e. [email protected] | |
brew search php | |
# install it | |
brew install [email protected] | |
# it will tell you to run some commands suited to your system i.e. | |
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc | |
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc | |
# close your terminal window and open a new one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment