1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/opcache/tests/func_info.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

35 lines
660 B
PHP

--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
--EXTENSIONS--
opcache
--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--