xref: /PHP-8.4/ext/dl_test/tests/skip.inc (revision b21df698)
1<?php
2
3// Check that the dl_test extension is built. We don't use the --EXTENSIONS--
4// section because we want to load the extension with dl().
5
6if (PHP_OS_FAMILY === 'Windows') {
7    $path = ini_get('extension_dir') . DIRECTORY_SEPARATOR . 'php_dl_test.dll';
8} else {
9    $path = ini_get('extension_dir') . DIRECTORY_SEPARATOR . 'dl_test.so';
10}
11
12if (!file_exists($path)) {
13    die(sprintf('skip dl_test extension is not built (tried %s)', $path));
14}
15
16if (getenv('SKIP_ASAN')) {
17    die('xleak dl() crashes LSan');
18}
19