mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
* mysqli_get_server_info() cannot return null. The underlying API is infallible. * mysqli_select_db() func info is redundant. * mb_detect_order() can only return array|true, not array|false. Also make the func_info.phpt test that is supposed to catch these kinds of issues actually work.
35 lines
685 B
PHP
35 lines
685 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
|
|
--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--
|