Skip to content

Instantly share code, notes, and snippets.

@jaggy
Last active December 19, 2017 23:27
Show Gist options
  • Save jaggy/7e08f40ecd3daec9970f7040383d3fa7 to your computer and use it in GitHub Desktop.
Save jaggy/7e08f40ecd3daec9970f7040383d3fa7 to your computer and use it in GitHub Desktop.
*sh snippet for switching PHP versions.
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