Home  >  Article  >  Backend Development  >  Mac 下 php多版本切换

Mac 下 php多版本切换

WBOY
WBOYOriginal
2016-06-23 13:41:56843browse

php-version是一个帮助管理从brew安装的php版本切换的工具。

安装简单

$brew install php-version

然后执行

$source $(brew --prefix php-version)/php-version.sh && php-version 5

直接执行
php-version
就可以看到现有的版本,比如我自己的

$ php-version* 5.6.4    5.6.5

然后使用以下命令切换即可

$php-version 5.6.5

再看php的版本,已经切换好了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn