php 版本切換
brew install homebrew/php/php-version
.
細(xì)節(jié):
Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's equivalent configuration file:
source $(brew --prefix php-version)/php-version.sh && php-version 5
It is recommended that you install versions of PHP via homebrew as depicted below:
brew install php56
brew unlink php56
Type `php-version --help` for more configuration options.
指令:
-
php -v
- php-version
<version>
/ php-version
- brew unlink
<version>
若安裝沖突的時(shí)候運(yùn)行