終端中輸入
brew search php
brew install [email protected]
brew link [email protected]
brew link 出現warning執行(使用zsh的可將bash_profile改爲zshrc)
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile