1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 00:53:30 +02:00
Files
archived-php-src/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
Máté Kocsis ac0853eb26 Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00

28 lines
539 B
PHP

--TEST--
ReflectionMethod::invokeArgs() further errors
--FILE--
<?php
class TestClass {
public function foo() {
echo "Called foo()\n";
var_dump($this);
return "Return Val";
}
}
$foo = new ReflectionMethod('TestClass', 'foo');
$testClassInstance = new TestClass();
try {
var_dump($foo->invokeArgs($testClassInstance, true));
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(90) "ReflectionMethod::invokeArgs() expects argument #2 ($args) to be of type array, bool given"