Annotation of embedaddon/php/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: ReflectionClass::newInstanceArgs() - wrong arg type
3: --CREDITS--
4: Robin Fernandes <robinf@php.net>
5: Steve Seear <stevseea@php.net>
6: --FILE--
7: <?php
8: class A {
9: public function __construct($a, $b) {
10: echo "In constructor of class B with arg $a\n";
11: }
12: }
13: $rc = new ReflectionClass('A');
14: $a = $rc->newInstanceArgs('x');
15: var_dump($a);
16:
17: ?>
18: --EXPECTF--
19:
1.1.1.2 ! misho 20: Catchable fatal error: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s on line 8
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>