on php, php7, homebrew, mac

Install PHP 7 on Mac with homebrew

Working on a mac and coding with PHP?

Its probably time to install PHP 7. It's like the second coming of christ in PHP, so why not join in.

Lets start by updating, brew:

brew update;  

Un-install old version of php:

brew unlink php53 php54 php55 php56;  

Then will need to install php7

brew tap homebrew/dupes;  
brew tap homebrew/versions;  
brew tap homebrew/homebrew-php;  
brew install php70;  

Install composer

brew install composer;  

Run it in one command, just copy and paste this into your terminal:

wget -O - https://gist.githubusercontent.com/Tom-Millard/7391a827ddfb617a4a69dbfd985a4b65/raw/8d25a0d52938b0a94858b7f63343e372076bb5e2/gistfile1.sh | bash