1. 先 tap hombrew-php
brew tap homebrew/homebrew-php
2. 安裝 php56 (我沒有刻意移除過去的存在的 php55版本)(安裝需要一點時間)
brew install php56
3. 修改你的檔案 .profile, .zshrc, .bashrc 或者 .bash_profile,看你用哪一種,加入以下的 export $PATH:
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH”
4. 重新 source .profile, .zshrc, .bashrc 或者 .bash_profile:
像我是用 .zshrc:
source ~/.zshrc
brew tap homebrew/homebrew-php
2. 安裝 php56 (我沒有刻意移除過去的存在的 php55版本)(安裝需要一點時間)
brew install php56
3. 修改你的檔案 .profile, .zshrc, .bashrc 或者 .bash_profile,看你用哪一種,加入以下的 export $PATH:
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH”
4. 重新 source .profile, .zshrc, .bashrc 或者 .bash_profile:
像我是用 .zshrc:
source ~/.zshrc