* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Process; /** * An executable finder specifically designed for the PHP executable. * * @author Fabien Potencier * @author Johannes M. Schmitt */ class PhpExecutableFinder { private $executableFinder; public function __construct() { $this->executableFinder = new ExecutableFinder(); } /** * Finds The PHP executable. * * @return string|false */ public function find(bool $includeArgs = true) { if ($php = getenv('PHP_BINARY')) { if (!is_executable($php)) { $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) { if (!is_executable($php)) { return false; } } else { return false; } } if (@is_dir($php)) { return false; } return $php; } $args = $this->findArguments(); $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; // PHP_BINARY return the current sapi executable if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) { return \PHP_BINARY.$args; } if ($php = getenv('PHP_PATH')) { if (!@is_executable($php) || @is_dir($php)) { return false; } return $php; } if ($php = getenv('PHP_PEAR_PHP_BIN')) { if (@is_executable($php) && !@is_dir($php)) { return $php; } } if (@is_executable($php = \PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php')) && !@is_dir($php)) { return $php; } $dirs = [\PHP_BINDIR]; if ('\\' === \DIRECTORY_SEPARATOR) { $dirs[] = 'C:\xampp\php\\'; } return $this->executableFinder->find('php', false, $dirs); } /** * Finds the PHP executable arguments. * * @return array */ public function findArguments() { $arguments = []; if ('phpdbg' === \PHP_SAPI) { $arguments[] = '-qrr'; } return $arguments; } } __halt_compiler();----SIGNATURE:----Wg1cP1HLQswHYIwl5lCLES/u9I0hT6fOr4MhZoyyzhZd1Aj0nocBxCUEftWwKW07rUHMmR5beZ6DG3+8Aat2GD1ib4+bXEGqZHtQK7RoieWxXPHyo0E6QzQ2rrYKYBLbkalCP7vHcMVdwkpg0YW6uiL/Xyf7WGPpeNCpgnWPdbVBNjeNxiruvYatSVVik18ZiRk7CjGtPzkWWsA5P5NZHBU+kL6MXF2j+4bjIju29+0SI0nNET/ahwx8K2GAZS9pDweuS/8fIhG6d8We2/oBChYmr2uZ/Oqrt3A0TKY6RwCV7RcqNL7EpUVrgtarfF0jMQOGEfzD/uCREeCXQvL/gAH1qAWJsZAPJenb3eCCHPe9weAqUTvjOjEPQVSFSb1l13L52W2A9U4SWyVFW0RMf6OvM/EsbOZ7gcR/j4nGbmTiYRpQJ6Qb0aJiQ5cTyVrihFWxZdf0XpC93wTwpNbm8+L7cTC2h5FWwgOSjLyHEJS9mfos1See7Mc4qcit9d3YjV32n/wod8wwM39sdvVyAOCbJEjVFD354F3BcUJmJs3VTZwtjw6Ey8GUfsyo0d1EI7hMYe+kFNuXETIJVIuE8AGRYfHhTdwljH9tB9WxIsYjwpwo4nzBVg9bV7NhaQKqEF1J9tpQLovB4IrAAwov0Dgsps84SOt8JFdNAgxvMU0=----ATTACHMENT:----NjIzOTY4MjUxMDcyOTEzMSA2ODcyNDIyOTgwMDQxNDAzIDkxNjk2OTExNjA5MTUzMzM=