Skip to content

Commit e045b88

Browse files
authored
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.
1 parent 5bd1bbd commit e045b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ function write_information(array $user_tests, $phpdbg): void
859859
$exts = get_loaded_extensions();
860860
$ext_dir = ini_get('extension_dir');
861861
foreach (scandir($ext_dir) as $file) {
862-
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
862+
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:' . PHP_SHLIB_SUFFIX . ')$/', $file, $matches)) {
863863
if (!extension_loaded($matches[1])) {
864864
$exts[] = $matches[1];
865865
}

0 commit comments

Comments
 (0)