$exts_to_test = array();
$ini_overwrites = array(
- 'output_handler=',
- 'open_basedir=',
- 'disable_functions=',
- 'output_buffering=Off',
- 'error_reporting=' . (E_ALL | E_STRICT),
- 'display_errors=1',
- 'display_startup_errors=1',
- 'log_errors=0',
- 'html_errors=0',
- 'track_errors=0',
- 'report_memleaks=1',
- 'report_zend_debug=0',
- 'docref_root=',
- 'docref_ext=.html',
- 'error_prepend_string=',
- 'error_append_string=',
- 'auto_prepend_file=',
- 'auto_append_file=',
- 'ignore_repeated_errors=0',
- 'precision=14',
- 'memory_limit=128M',
- 'log_errors_max_len=0',
- 'opcache.fast_shutdown=0',
- 'opcache.file_update_protection=0',
- 'opcache.preload=',
- 'zend.assertions=1',
- );
+ 'output_handler=',
+ 'open_basedir=',
+ 'disable_functions=',
+ 'output_buffering=Off',
+ 'error_reporting=' . (E_ALL | E_STRICT),
+ 'display_errors=1',
+ 'display_startup_errors=1',
+ 'log_errors=0',
+ 'html_errors=0',
+ 'track_errors=0',
+ 'report_memleaks=1',
+ 'report_zend_debug=0',
+ 'docref_root=',
+ 'docref_ext=.html',
+ 'error_prepend_string=',
+ 'error_append_string=',
+ 'auto_prepend_file=',
+ 'auto_append_file=',
+ 'ignore_repeated_errors=0',
+ 'precision=14',
+ 'memory_limit=128M',
+ 'log_errors_max_len=0',
+ 'opcache.fast_shutdown=0',
+ 'opcache.file_update_protection=0',
++ 'opcache.preload=',
+ 'zend.assertions=1',
+ );
$no_file_cache = '-d opcache.file_cache= -d opcache.file_cache_only=0';
$ignored_by_ext = 0;
sort($exts_to_test);
$test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'sapi');
+$optionals = array('tests', 'ext', 'Zend');
- foreach($optionals as $dir) {
+ foreach ($optionals as $dir) {
if (is_dir($dir)) {
$test_dirs[] = $dir;
}
{
$url_bits = parse_url(QA_SUBMISSION_PAGE);
- if (($proxy = getenv('http_proxy'))) {
+ if ($proxy = getenv('http_proxy')) {
$proxy = parse_url($proxy);
- $path = $url_bits['host'].$url_bits['path'];
+ $path = $url_bits['host'] . $url_bits['path'];
$host = $proxy['host'];
if (empty($proxy['port'])) {
$proxy['port'] = 80;
}
/* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */
+ $extra_options = '';
if (array_key_exists('PHPDBG', $section_text)) {
if (!isset($section_text['STDIN'])) {
- $section_text['STDIN'] = $section_text['PHPDBG']."\n";
+ $section_text['STDIN'] = $section_text['PHPDBG'] . "\n";
}
if (isset($phpdbg)) {
$ext_params = array();
settings2array($ini_overwrites, $ext_params);
settings2params($ext_params);
- $ext_dir=`$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
- $ext_dir = `$php $pass_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
++ $ext_dir = `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
$extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
- $loaded = explode(",", `$php $pass_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
+ $loaded = explode(",", `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
$ext_prefix = substr(PHP_OS, 0, 3) === "WIN" ? "php_" : "";
foreach ($extensions as $req_ext) {
if (!in_array($req_ext, $loaded)) {
junit_start_timer($shortname);
$hrtime = hrtime();
- $startTime = $hrtime[0]*1000000000 + $hrtime[1];
+ $startTime = $hrtime[0] * 1000000000 + $hrtime[1];
- $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null, $captureStdIn, $captureStdOut, $captureStdErr);
+ $out = system_with_timeout($cmd, $env, $section_text['STDIN'] ?? null, $captureStdIn, $captureStdOut, $captureStdErr);
junit_finish_timer($shortname);
$hrtime = hrtime();
settings2array($ini_overwrites, $clean_params);
settings2params($clean_params);
$extra = substr(PHP_OS, 0, 3) !== "WIN" ?
- "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": "";
+ "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : "";
- system_with_timeout("$extra $php $pass_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
+ system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
}
if (!$cfg['keep']['clean']) {