Install PHP 5.6 or PHP 7 on MacOSX

You can update the PHP installation with just a one line command from your terminal. Head to this page for more info:

https://php-osx.liip.ch/

To update the command line to also use the new installation, open the following file via command line:

~/.bash_profile

And add the following line:

export PATH=/usr/local/php5/bin:$PATH

Close terminal and open it up again. Now “php -v” should give you the new PHP version.