Firstly install Brew on your MAC
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install PHP
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
- brew install composer
to test installation, runs:
$ composer -V
Composer version 1.1.2 2016-05-31 19:48:11
Thanks! For others wanting to install php 7, just replace the first line by:
brew install php71