Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@ function find_xml_files($path) // {{{
}
} // }}}

function find_php_bin_name(): string
{
return find_file([
'php' . PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION,
'php',
'cli/php',
'php.exe',
'php-cli.exe',
'php-cgi.exe',
]);
}

$srcdir = dirname(__FILE__);
$workdir = $srcdir;
$basedir = $srcdir;
Expand All @@ -265,7 +277,6 @@ function find_xml_files($path) // {{{

// Settings {{{
$cygwin_php_bat = "{$srcdir}/../phpdoc-tools/php.bat";
$php_bin_names = array('php', 'php5', 'cli/php', 'php.exe', 'php5.exe', 'php-cli.exe', 'php-cgi.exe');
// }}}

$acd = array( // {{{
Expand Down Expand Up @@ -483,7 +494,7 @@ function find_xml_files($path) // {{{

checking("for PHP executable");
if ($ac['PHP'] == '' || $ac['PHP'] == 'no') {
$ac['PHP'] = find_file($php_bin_names);
$ac['PHP'] = find_php_bin_name();
} else if (file_exists($cygwin_php_bat)) {
$ac['PHP'] = $cygwin_php_bat;
}
Expand Down
Loading