File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
reflection /
tests /
ReflectionMethod_invoke_error2.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:00 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
ReflectionMethod::invoke() further errors
--FILE--
<?php
class TestClass {
public function methodWithArgs($a, $b) {
echo "Called methodWithArgs($a, $b)\n";
}
}
$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
$testClassInstance = new TestClass();
echo "\nMethod with args:\n";
var_dump($methodWithArgs->invoke($testClassInstance));
?>
--EXPECTF--
Method with args:
Warning: Missing argument 1 for TestClass::methodWithArgs() in %s on line %d
Warning: Missing argument 2 for TestClass::methodWithArgs() in %s on line %d
Notice: Undefined variable: a in %s on line %d
Notice: Undefined variable: b in %s on line %d
Called methodWithArgs(, )
NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>