protected static function _getPhpBinary()
{
if (!is_null(self::$_phpBin)) {
return self::$_phpBin;
}
if (is_readable('/usr/bin/php')) {
self::$_phpBin = '/usr/bin/php';
} elseif (PHP_SAPI == 'cli' && isset($_SERVER['_']) && strpos($_SERVER['_'], 'mutagenesis') !== false) {
$file = file($_SERVER['_']);
$tmp = explode(' ', $file[0]);
self::$_phpBin = trim($tmp[1]);
}
if (!is_readable(self::$_phpBin)) {
self::$_phpBin = 'php';
} else {
self::$_phpBin = escapeshellarg(self::$_phpBin);
}
return self::$_phpBin;
}