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 php@5.6 php@7.0 php@7.1 php@7.2
brew link --force --overwrite $1
brew services start $1
composer global update
valet install
}
alias php56="phpv php@5.6"
alias php70="phpv php@7.0"
alias php71="phpv php@7.1"
alias php72="phpv php"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment