title: How to get bash to check for the location of a file?
body: <p>I want my bash script to find where PHP is installed - this will be used on different Linux servers, and some of them won't be able to use the <code>which</code> command. I need help with that second line:</p>
  <pre><code>#!/bin/bash
  if (php is located in /usr/bin/php); then
      PHP = /usr/bin/php
  else
      PHP = /usr/local/zend/bin/php
  fi
  $PHP script.php
  </code></pre>