I think one easy way to do this is:
1 - Check where your current PHP is located:
$ which php $ /usr/local/bin/php
You see? Usually our commands that we run are a link in / usr / local / bin, so ...
2 - Unlink this current PHP link
unlink /usr/local/bin/php
If you prefer, before disabling it, check the path and then delete the php files (do ls -al /usr/local/bin | grep php and then rm -rf to the desired path)
3 - Install PHP 7.1
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
4 - Create a new link (using installed php 7.1 bin)
ln /usr/local/php5-7.1.9-20170914-100859/bin/php /usr/local/bin/php
As I said, this is an easy way, I think.
Paulo Victor Sep 21 '17 at 18:01 2017-09-21 18:01
source share