You have two PHP executables installed. On my Mac OSX:
$ which php /usr/local/bin/php $ /usr/local/bin/php -v PHP 7.0.20 (cli) (built: Jul 12 2017 09:47:44) ( NTS )
And on the same computer:
$ whereis php /usr/bin/php $ /usr/bin/php -v PHP 5.6.30 (cli) (built: Feb 7 2017 16:18:37)
You should put / usr / local / bin in your PATH. Edit ~ / .bash_profile
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
Open a new terminal and check your php version.
source share