Skip to content

adrorocker/php-switcher-mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Switcher for Mac

Requirements

  • Homebrew
  • PHP installed through brew (7.1, 7.2 and 7.3)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install [email protected]
brew install [email protected]
brew install [email protected]

Start the services

brew services start php
brew services start [email protected]
brew services start [email protected]

Instructions

  • In your .bash_profile file create a variable called PHP_HOME
  • Export the path: export PATH=$PHP_HOME/bin:$PATH
  • Give the script execution permissions and then move it to you bin folder so you can execute it as a global command.
chmod +x sphp.sh
mv sphp.sh /usr/local/bin/sphp

Usage

sphp 7.2