add the taps, unlink the old PHP if required and add php7
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56
brew install php70
brew install php70-xdebug
brew install mcrypt php70-mcrypt
And the result?
$ php --version
PHP 7.0.0 (cli) (built: Dec 2 2015 13:05:57) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
All ready to go!
References
- homebrew instructions http://justinhileman.info/article/reinstalling-php-on-mac-os-x/
- from Justin Hileman https://www.twitter.com/bobthecow