xref: /PHP-8.1/ext/opcache/tests/func_info.phpt (revision e9f783fc)
1--TEST--
2Test that return types in zend_func_info.c match return types in stubs
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11
12$contents = "<?php\n";
13
14$contents .= "function test() {\n";
15foreach (get_defined_functions()["internal"] as $function) {
16    if (in_array($function, ["extract", "compact", "get_defined_vars"])) {
17        continue;
18    }
19    $contents .= "    \$result = {$function}();\n";
20}
21$contents .= "}\n";
22
23file_put_contents("func_info_generated.php", $contents);
24
25require_once("func_info_generated.php");
26
27?>
28--CLEAN--
29<?php
30
31unlink("func_info_generated.php");
32
33?>
34--EXPECT--
35