Skip to content

Instantly share code, notes, and snippets.

@paperscissors
Created September 14, 2022 19:29
Show Gist options
  • Save paperscissors/cc762c9d2282d969fe7fac913cded03a to your computer and use it in GitHub Desktop.
Save paperscissors/cc762c9d2282d969fe7fac913cded03a to your computer and use it in GitHub Desktop.
switchphp () {
phpversion="$(php -v | head -n 1 | cut -d " " -f 2 | cut -f1-2 -d".")"
brew unlink php@$phpversion && brew link php@$1 && valet use php@$1 --force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment