title: How to switch PHP one version to another version in MAC OS?
body: <p>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.</p>
  
  <pre><code>#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
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I see my php installtion directory is under
   <strong>/usr/local/etc/php/7.1</strong> 
  But it contains only php.ini and pear.conf files.</p>
  
  <p>I tried</p>
  
  <p><strong>export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH"</strong>
  But it didn't change my php version.( i tried php --version, still shows 5.5)</p>