- 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]
- In your
.bash_profile
file create a variable calledPHP_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
sphp 7.2