Skip to content

Instantly share code, notes, and snippets.

@rbotzer
Last active July 31, 2017 09:26
Show Gist options
  • Save rbotzer/198a04f2315e88c75322 to your computer and use it in GitHub Desktop.
Save rbotzer/198a04f2315e88c75322 to your computer and use it in GitHub Desktop.
Installing PHP versions on Mac OS X Mavericks (10.9)

Installing PHP versions on Mac OS X Mavericks (10.9+) and Higher

Using Homebrew, Homebrew-PHP and the RVM-like brew-php-switcher you can easily switch between multiple installed versions of PHP on your OS X machine (Mavericks 10.9 to El-Capitan 10.11).

Install the command line tools

    xcode-select --install # install the command line tools, if missing

Install Homebrew

    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    brew update && brew doctor

Install Multiple PHP versions

    brew tap homebrew/dupes
    brew tap homebrew/versions
    brew tap homebrew/homebrew-php
    brew update
    brew install php53
    brew install php54
    brew install php55
    brew install brew-php-switcher
    brew-php-switcher 55
    php -v # verify that it is PHP 5.5
@rbotzer
Copy link
Author

rbotzer commented Sep 5, 2014

Thanks to philcook and the Homebrew crew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment