summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/func_info.phpt
blob: f5e4b5b182783070024ca7176e723509357bc7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Test that return types in zend_func_info.c match return types in stubs
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php

$contents = "<?php\n";

$contents .= "function test() {\n";
foreach (get_defined_functions()["internal"] as $function) {
    if (in_array($function, ["extract", "compact", "get_defined_vars"])) {
        continue;
    }
    $contents .= "    \$result = {$function}();\n";
}
$contents .= "}\n";

file_put_contents("func_info_generated.php", $contents);

require_once("func_info_generated.php");

?>
--CLEAN--
<?php

unlink("func_info_generated.php");

?>
--EXPECT--