Last active
August 29, 2015 14:03
-
-
Save krismas/92e3e31674dbcfd7ba83 to your computer and use it in GitHub Desktop.
Try to find the best location for PHP binary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Try to find the best location for PHP binary | |
$sPHP = ((isset($_SERVER['_']) && $_SERVER['_']) ? $_SERVER['_'] : (defined(PHP_BINARY) ? PHP_BINARY : (defined(PHP_BINDIR) ? PHP_BINDIR.'/php' : preg_replace(':/lib$:', '/bin/php', PHP_CONFIG_FILE_PATH)))); | |
$sPHP = (is_executable($sPHP) ? $sPHP : 'php'); | |
echo "$sPHP\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment