昨天随手一点 brew upadte brew upgrade 后phpunit出现了各种F,细查下来原来是 php 5.5.17 的一个bug fix 引起的。为了暂时正常使用phpunit,只能回退php的版本。 版本切换方式 通过brew安装的php可以通过 brew link 和 brew unlink 来切换不同版本。 例如
昨天随手一点
brew upadte & brew upgrade
后phpunit出现了各种F,细查下来原来是 php 5.5.17 的一个bug fix 引起的。为了暂时正常使用phpunit,只能回退php的版本。
版本切换方式
通过brew安装的php可以通过brew link
和brew unlink
来切换不同版本。
例如
brew list brew unlink php56 brew link php55
大版本可以用brew list
来查,如果是小版本的话只能去/usr/local/Cellar/php55
看了。这个时候使用php-version
可以更方便一点。
安装php-version
php-version是一个帮助管理从brew安装的php版本切换的工具。
安装非常简单
brew install php-version
然后执行
source $(brew --prefix php-version)/php-version.sh && php-version 5
使用php-version
直接执行
php-version
就可以看到现有的版本,比如我自己的
$ php-version 5.5.15 * 5.5.16 5.5.17
然后使用以下命令切换即可
php-version 5.5.15
再看php的版本,已经切换好了。
原文地址:回退Mac上用Brew安装的PHP版本, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment
