mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00

PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
31 lines
424 B
PHP
31 lines
424 B
PHP
--TEST--
|
|
phpinfo() CGI
|
|
--POST--
|
|
dummy=x
|
|
--FILE--
|
|
<?php
|
|
var_dump(phpinfo());
|
|
|
|
echo "--\n";
|
|
var_dump(phpinfo(array()));
|
|
|
|
echo "--\n";
|
|
var_dump(phpinfo(0));
|
|
|
|
echo "--\n";
|
|
var_dump(phpinfo(INFO_LICENSE));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
<!DOCTYPE %s>
|
|
%a</html>bool(true)
|
|
--
|
|
|
|
Warning: phpinfo() expects parameter 1 to be int, array given in %sphpinfo2.php on line 5
|
|
NULL
|
|
--
|
|
<!DOCTYPE %s>
|
|
%a</html>bool(true)
|
|
--
|
|
<!DOCTYPE %s>
|
|
%a</html>bool(true)
|