I have installed php7.1 using homebrew in mac. But when i try php -version it shows 5.5. How can I switch version. I could not find my php instalation directory for php7.1 to set the path at bash_profile.
#brew install php71
Warning: homebrew/php/php71 7.1.7_19 is already installed
#php --version
PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
Edit
I see my php installtion directory is under /usr/local/etc/php/7.1 But it contains only php.ini and pear.conf files.
I tried
export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH" But it didn't change my php version.( i tried php --version, still shows 5.5)