If you upgraded using curl, copy and paste the following line of code and press enter.
$ export PATH = / usr / local / php5 / bin: $ PATH
Now enter $ php -v
If done correctly, it should show the following
PHP 5.6.23 (cli) (built: June 26, 2016 13:17:47) Copyright (c) 1997-2016 PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, Zend Technologies with Xdebug v2.2.5, Copyright (c) 2002-2014, Derick Rethans
source share