improve pcntl_* function detect

This commit is contained in:
lgb
2024-04-09 19:35:04 +08:00
parent 8c3b05bf4d
commit 68a0bd96c3
2 changed files with 3 additions and 2 deletions

View File

@@ -172,7 +172,8 @@ class Install
$output = [];
$command = "php -r 'var_export(function_exists(\"$fn\"));'";
$result = exec($command, $output, $result_code);
$exists = $output[0] == 'true';
$lastThreeChars = substr(trim($output[0]), -3);
$exists = $lastThreeChars == 'true';
if (!$exists) {
$disabledFunctions[] = $fn;
}