Created
June 21, 2023 07:56
-
-
Save itsmikita/6bd308764b06a1b93436856f052723ff to your computer and use it in GitHub Desktop.
A tiny shortcut function to switch between PHP versions on macOS.
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
# switch php version | |
function switch_php() { | |
brew services stop [email protected] | |
brew services stop php | |
brew unlink [email protected] | |
brew unlink php | |
case $1 in | |
7.4) | |
brew services start [email protected] | |
brew link [email protected] | |
;; | |
*) | |
brew services start php | |
brew link php | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment