Skip to content

Commit 0b0a0e0

Browse files
committed
readd extension_loaded() to mitigate the issue
1 parent f2b7552 commit 0b0a0e0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

run-tests.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,12 @@ function write_information(): void
877877
$ext_dir = ini_get('extension_dir');
878878
foreach (scandir($ext_dir) as $file) {
879879
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
880-
$t = microtime(true);
881-
var_dump($matches[1]);
880+
// remove once https://github.com/php/php-src/issues/9196 is fixed
881+
// @dl() is fast (about 1 ms / dl() call)
882+
if (extension_loaded($matches[1])) {
883+
continue;
884+
}
885+
882886
if (dl($matches[1])) {
883887
$exts[] = $matches[1];
884888
$exts[] = microtime(true) - $t;

0 commit comments

Comments
 (0)