func_info.phpt 660 B

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