mirror of
https://github.com/php/php-src.git
synced 2026-03-25 16:52:18 +01:00
To avoid duplicate type checks. In debug builds arginfo is still checked and will generate an assertions if the function doesn't subsequently throw an exception. Some test results change due to differences in zpp and arginfo error messages.
28 lines
523 B
PHP
28 lines
523 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(74) "ReflectionMethod::invokeArgs() expects parameter 2 to be array, bool given"
|