-
-
Save jaggy/7e08f40ecd3daec9970f7040383d3fa7 to your computer and use it in GitHub Desktop.
*sh snippet for switching PHP versions.
This file contains 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
function phpv() { | |
brew unlink php$(php -v | head -n1 | grep -o -E '\d\.\d' | tr -d '.') | |
brew link php$1 | |
valet restart | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment