36 public function find($includeArgs =
true)
39 $args = $includeArgs && $args ?
' '.implode(
' ', $args) :
'';
43 return (getenv(
'PHP_BINARY') ?: PHP_BINARY).$args;
47 if (PHP_BINARY && in_array(PHP_SAPI,
array(
'cli',
'cli-server',
'phpdbg')) && is_file(PHP_BINARY)) {
48 return PHP_BINARY.$args;
51 if (
$php = getenv(
'PHP_PATH')) {
52 if (!is_executable(
$php)) {
59 if (
$php = getenv(
'PHP_PEAR_PHP_BIN')) {
60 if (is_executable(
$php)) {
65 $dirs =
array(PHP_BINDIR);
66 if (
'\\' === DIRECTORY_SEPARATOR) {
67 $dirs[] =
'C:\xampp\php\\';
70 return $this->executableFinder->find(
'php',
false, $dirs);
83 $arguments[] =
'--php';
84 } elseif (
'phpdbg' === PHP_SAPI) {
85 $arguments[] =
'-qrr';
find($includeArgs=true)
Finds The PHP executable.
findArguments()
Finds the PHP executable arguments.
An executable finder specifically designed for the PHP executable.
Generic executable finder.
Create styles array
The data for the language used.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'