1--TEST--
2dl(): Loaded extensions support ini_set()
3--SKIPIF--
4<?php
5include dirname(__DIR__, 3) . "/dl_test/tests/skip.inc";
6if (getenv('SKIP_ASAN')) die('skip fails intermittently on ASAN');
7?>
8--FILE--
9<?php
10
11if (extension_loaded('dl_test')) {
12    exit('Error: dl_test is already loaded');
13}
14if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
15    $loaded = dl('php_dl_test.dll');
16} else {
17    $loaded = dl('dl_test.so');
18}
19
20var_dump($loaded);
21
22dl_test_test1();
23var_dump(dl_test_test2("World!"));
24
25ini_set("dl_test.long", "1");
26ini_set("dl_test.string", "world");
27
28var_dump(ini_get("dl_test.long"));
29var_dump(ini_get("dl_test.string"));
30
31echo "OK\n";
32?>
33--EXPECT--
34bool(true)
35The extension dl_test is loaded and working!
36string(12) "Hello World!"
37string(1) "1"
38string(5) "world"
39OK
40