1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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.
This commit is contained in:
Peter Kokot
2026-02-26 17:54:34 +01:00
committed by GitHub
parent 5bd1bbdc50
commit e045b881cf

View File

@@ -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];
}