diff --git drush drush
index c5b3ee5..8db75fa 100755
--- drush
+++ drush
@@ -31,19 +31,17 @@ if [ -z $COLUMNS ]; then
 fi
 
 # Special case for *AMP installers, since they normally don't set themselves as the default cli php out of the box.
-if [ -f /Applications/MAMP/bin/php5/bin/php ]; then # MAMP (OS X)
-  /Applications/MAMP/bin/php5/bin/php $SCRIPT_PATH "$@"
-elif [ -f /opt/lampp/bin/php ]; then # XAMPP on GNU/Linux
-  /opt/lampp/bin/php $SCRIPT_PATH "$@"
-elif [ -f /Applications/xampp/xamppfiles/bin/php ]; then # XAMPP on OS X
-  /Applications/xampp/xamppfiles/bin/php $SCRIPT_PATH "$@"
-else
-  # We check for a command line (cli) version of php, and if found use that.
-  which php-cli >/dev/null 2>&1
-  if [ "$?" = 0 ] ; then
-    php-cli $SCRIPT_PATH "$@"
-  else
-    # Alternatively we run with straight php, which works on most other systems.
-    php $SCRIPT_PATH "$@"
+for php in /Applications/MAMP/bin/php5/bin/php /opt/lampp/bin/php /Applications/xampp/xamppfiles/bin/php ; do 
+  if [ -x $php ]; then
+    exec $php $SCRIPT_PATH --php="$php" "$@"
   fi
+done
+
+# We check for a command line (cli) version of php, and if found use that.
+which php-cli >/dev/null 2>&1
+if [ "$?" = 0 ] ; then
+  exec php-cli $SCRIPT_PATH --php="php-cli" "$@"
+else
+  # Alternatively we run with straight php, which works on most other systems.
+  exec php $SCRIPT_PATH "$@"
 fi
diff --git drush.php drush.php
index ce25a1b..375e63b 100755
--- drush.php
+++ drush.php
@@ -25,11 +25,11 @@ define('DRUSH_BASE_PATH', dirname(__FILE__));
 
 define('DRUSH_REQUEST_TIME', microtime(TRUE));
 
+require_once DRUSH_BASE_PATH . '/includes/context.inc';
 require_once DRUSH_BASE_PATH . '/includes/environment.inc';
 require_once DRUSH_BASE_PATH . '/includes/command.inc';
 require_once DRUSH_BASE_PATH . '/includes/drush.inc';
 require_once DRUSH_BASE_PATH . '/includes/backend.inc';
-require_once DRUSH_BASE_PATH . '/includes/context.inc';
 require_once DRUSH_BASE_PATH . '/includes/sitealias.inc';
 
 drush_set_context('argc', $GLOBALS['argc']);
diff --git includes/drush.inc includes/drush.inc
index 0fc104c..ef0721c 100644
--- includes/drush.inc
+++ includes/drush.inc
@@ -319,7 +319,8 @@ function drush_get_option_help() {
   $options['-b, --backend']            = dt("Hide all output and return structured data (internal use only).");
   $options['-p, --pipe']               = dt("Emit a compact representation of the command for scripting.");
   $options['-n, --nocolor']            = dt("Suppress color highlighting on log messages.");
-  $options['-h, --help']               = dt("The absolute path to your PHP intepreter.");
+  $options['-h, --help']               = dt("This help system.");
+  $options['--php']                    = dt("The absolute path to your PHP intepreter, if not 'php' in the path.");
   return $options;
 }
 
diff --git includes/environment.inc includes/environment.inc
index 8d2be5a..7cf3fc2 100644
--- includes/environment.inc
+++ includes/environment.inc
@@ -391,6 +391,8 @@ function _drush_bootstrap_drush() {
   // parse the command line arguments.
   drush_parse_args();
 
+  define('DRUSH_COMMAND', drush_find_drush());
+
   // Load a custom config specified with the --config option.
   drush_load_config('custom'); 
 
@@ -929,35 +931,18 @@ function drush_valid_db_credentials() {
  * Calling ./drush.php directly yields the following environment:
  *
  * _SERVER["argv"][0] => ./drush.php
- * _SERVER["_"] => /home/anarcat/dist/drush/./drush.php
  * 
- * Calling php ./drush.php yields the following:
+ * Calling php ./drush.php also yields the following:
  * 
- * _SERVER["argv"][0] => drush.php
- * _SERVER["_"] => /usr/bin/php
- *
- * Calling env php drush.php yields the following:
- *
- * _SERVER["argv"][0] => drush.php
- * _SERVER["_"] => /usr/bin/env
- *
- * The latter is a problem as there is no way to find the PHP
- * executable then. We consider it's the job of the shell script
- * wrapper to do that fiddling around and we will therefore assume
- * that $argv[0] is a proper PHP binary.
- *
- * Calling sudo php drush.php yields the following:
- *
- * _SERVER["argv"][0] => drush.php
- * _SERVER["SUDO_COMMAND"] => /usr/bin/php drush.php [arguments]
+ * _SERVER["argv"][0] => ./drush.php
  *
- * Notice how _ is missing when running in sudo.
+ * Note that the $_ global is defined only in bash and therefore cannot
+ * be relied upon.
  *
- * Therefore, we assume that if $_ finishes with $argv[0], we can call
- * it directly again. Otherwise, we assume that $_ is the php binary
- * and $argv[0] is the path to drush.php. We will use __FILE__,
- * however, since we do not want to rely on (potentially) relative
- * paths.
+ * We will therefore assume PHP is available in the path and is named
+ * "php" for execute ourselves. That is, the #!/usr/bin/env php is
+ * working and valid, unless a PHP constant is defined, which can be
+ * done by the shell wrapper.
  *
  * The DRUSH_COMMAND constant is initialised to the value of this
  * function when environment.inc is loaded.
@@ -965,19 +950,10 @@ function drush_valid_db_credentials() {
  * @see DRUSH_COMMAND
  */
 function drush_find_drush() {
-  if (!empty($_ENV['SUDO_COMMAND']) && empty($_SERVER['_'])) {
-    // 'SUDO_COMMAND' is an environment variable set by the sudo program.
-    // Extract only the PHP interpreter, not the rest of the command.
-    list($_SERVER['_'], ) = explode(' ', $_ENV['SUDO_COMMAND'], 2);
-  }
-  if (substr($_SERVER['_'], -strlen($_SERVER['argv'][0])) == $_SERVER['argv'][0]) {
-    // $GLOBALS['_'] and $GLOBALS['argv'][0] both finish with the same,
-    // which means we were called directly
-    $drush = realpath($_SERVER['_']);
+ if (drush_get_option(array('php'))) {
+    $drush = drush_get_option(array('php')) . " " . realpath($_SERVER['argv'][0]);
   } else {
-    // not called directly, we were called as an argument to PHP, which
-    // should be in $GLOBALS['_']
-    $drush = $_SERVER['_'] . ' ' . realpath($_SERVER['argv'][0]);
+    $drush = realpath($_SERVER['argv']['0']);
   }
   return $drush;
 }
