1--TEST--
2dl(): use zend_register_functions() directly
3--ENV--
4PHP_DL_TEST_USE_REGISTER_FUNCTIONS_DIRECTLY=1
5--SKIPIF--
6<?php require dirname(__DIR__, 3) . "/dl_test/tests/skip.inc"; ?>
7--FILE--
8<?php
9
10if (extension_loaded('dl_test')) {
11    exit('Error: dl_test is already loaded');
12}
13
14if (PHP_OS_FAMILY === 'Windows') {
15    $loaded = dl('php_dl_test.dll');
16} else {
17    $loaded = dl('dl_test.so');
18}
19
20var_dump($loaded);
21var_dump(dl_test_use_register_functions_directly());
22?>
23--EXPECT--
24bool(true)
25string(2) "OK"
26