mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +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".
18 lines
512 B
PHP
18 lines
512 B
PHP
--TEST--
|
|
ReflectionClass::getMethods() - invalid arguments
|
|
--CREDITS--
|
|
Robin Fernandes <robinf@php.net>
|
|
Steve Seear <stevseea@php.net>
|
|
--FILE--
|
|
<?php
|
|
$rc = new ReflectionClass("ReflectionClass");
|
|
echo "\nTest invalid arguments:";
|
|
$rc->getMethods('X');
|
|
$rc->getMethods('X', true);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Test invalid arguments:
|
|
Warning: ReflectionClass::getMethods() expects parameter 1 to be int, string given in %s on line 4
|
|
|
|
Warning: ReflectionClass::getMethods() expects at most 1 parameter, 2 given in %s on line 5
|