Skip to content

Instantly share code, notes, and snippets.

View joetsuihk's full-sized avatar

Joe joetsuihk

View GitHub Profile
@joetsuihk
joetsuihk / README.md
Last active March 7, 2016 11:56
# Change PHP version rapidly when using Homebrew (MacOSX)

Change PHP version rapidly when using Homebrew (MacOSX)

With Homebrew, sometimes you have many PHP versions installed. I personally use EVERY php version to be sure every open-source project I have on my env works for every version.

This is why I have php 5.3, 5.4, 5.5, 5.6 and 7.0 installed with Homebrew.

Switching php versions is a pain when using homebrew, because you have to brew unlink the php versions used, and brew link the one you want.

Executing this script without argument shows all versions installed, and especially the current version.