* * 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:----Cc+Y7wR+GrarYubVz2QuKR7LVouphQ+vYIQkOpWZvBPhVka769LABXjksBiMPenVmwvxMTvM+h89SRJ08a0eTHbNiqIzfqBPyPBLyMIDonlvnRYQ4viwFpge6TKUM3Y3IRy03zD8+n+XlZASgAXCNuRYKuYHpLjVthTNUygmUCCjrl3XT2N8ocBhYQnO8L55bC95DQzsBT1i+t2dbp5lzc00xgedllUrmZgMwCLh45rgNdB0LQ3QxzxADS0399XidvdMus6LMjYHXwxvYneIgChFlT2ZUDv43w7io23/0LFH5NeQXSW47Fc3PqkQqY7ZrSTGoD6xvZtmFkIv97k0pE7OzixFmsoqUFN4BcM83m+kjaIIoz3EG2FmtYpZj2wGDVxYhjpl7K2O10OYTgGaBYED7La6Q+Y+TO5iP/9yn5OzmwsXWJTVXuoA6a9QQkeOXpf8bUKSNK5gPiOTtC7YOqj+ONX59fW0YwmhpUxmI+e++3LqIBhMTx0gTLcL4aZjSrnT27lxx8UegJmbOxatHloqZ/dLICwE4+i7bjZDYsekP1/5Hla0olsTspEr/2sJnB0AjdDx5f5YVmF/edP9K47Ho1dcHPECW9aoIlRyGCKwzVTV7FcZmA3Og1UuQKO5BFuJ8tEIr/ra4iZBrU/2u6ZjTfPZDDNdcJ9vXuvXZgk=----ATTACHMENT:----NDU3OTk4NzUyNjc3NTE1OCA5ODI5MzY1MTIzMzQ3NjYwIDE5NTU3NzI0MzI5OTE1NTY=