Skip to content

Instantly share code, notes, and snippets.

@DavidMRGaona
Created March 8, 2019 09:17
Show Gist options
  • Save DavidMRGaona/110a5270399ee9036be7607bced96a04 to your computer and use it in GitHub Desktop.
Save DavidMRGaona/110a5270399ee9036be7607bced96a04 to your computer and use it in GitHub Desktop.
Script to easily change PHP version in OS X with brew
#!/bin/bash
phpv() {
valet stop
brew unlink [email protected] [email protected] [email protected] [email protected]
brew link --force --overwrite $1
brew services start $1
composer global update
valet install
}
alias php56="phpv [email protected]"
alias php70="phpv [email protected]"
alias php71="phpv [email protected]"
alias php72="phpv php"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment