From e045b881cf835287dd3fdbd06b72b01e960fed9a Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 26 Feb 2026 17:54:34 +0100 Subject: [PATCH] run-tests.php: Use PHP_SHLIB_SUFFIX (#21301) Instead of hardcoding the file extensions for shared PHP extensions (which in most cases are '.so', or '.dll'), this uses file extension for the current PHP build as it was defined during the configure/build phase. There can be systems where some other file extension is used for shared modules. --- run-tests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 634beffa533..68d2cb69256 100755 --- a/run-tests.php +++ b/run-tests.php @@ -859,7 +859,7 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n" $exts = get_loaded_extensions(); $ext_dir = ini_get('extension_dir'); foreach (scandir($ext_dir) as $file) { - if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) { + if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:' . PHP_SHLIB_SUFFIX . ')$/', $file, $matches)) { if (!extension_loaded($matches[1])) { $exts[] = $matches[1]; }