1- Run on Terminal curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
2- Wait for installation to complete
3- Run on terminal: export PATH=/usr/local/php5/bin:$PATH
If you don't want to run the command above every time you open a new terminal, you can update the PATH in your .bash_profile.
vi ~/.bash_profile
Old path: export PATH="~/.composer/vendor/bin:$PATH"
4- Restart apache: sudo /usr/sbin/apachectl restart
5- Verify new version: php -v