title: Can't use OSX's php after removing homebrew's php
body: <p>a few months ago, I installed php55 using homebrew. However, I don't need that anymore and want to use the php version that OS X ships itself.</p>
  
  <p>So I uninstalled php55 using homebrew. When I run <code>php -v</code> now, the following error occurs:</p>
  
  <pre><code>/usr/local/bin/php: No such file or directory
  </code></pre>
  
  <p>When I run <code>ls /usr/local/bin | grep php</code> I see that no php executable is there anymore (as expected due to uninstalling the package).</p>
  
  <p>When I run <code>echo $PATH</code>, it prints:</p>
  
  <pre><code>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin
  </code></pre>
  
  <p>As far as I understand the usage of the PATH variable, the terminal should search in /usr/bin for an executable called <code>php</code> when there is no one in /usr/local/bin, but it doesn't. And removing /usr/local/bin from the PATH isn't an option as long as I have other homebrew packages installed on the system.</p>
  
  <p>When running <code>which php</code> the output is as expected: /usr/bin/php, the php executable shipped by OS X.</p>
  
  <p>Any suggestions why the shell doesn't find the php executable?</p>
  
  <p>P.S. The details about the uninstalling of the php55 package:
  I uninstalled php55, php55-intl and all of their dependencies that are not needed by any other package. Then I untaped homebrew-php.</p>
  
  <p>My <code>brew doctor</code> output:</p>
  
  <pre><code>Warning: Some directories in /usr/local/share/man aren't writable.
  This can happen if you "sudo make install" software that isn't managed
  by Homebrew. If a brew tries to add locale information to one of these
  directories, then the install will fail during the link step.
  You should probably `chown` them:
  
      /usr/local/share/man/de
      /usr/local/share/man/de/man1
  
  Warning: You have unlinked kegs in your Cellar
  Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
  those kegs to fail to run properly once built. Run `brew link` on these:
  
      cloog018
      gmp4
      isl011
      libmpc08
      mpfr2
      zlib
  </code></pre>