Annotation of embedaddon/php/Zend/tests/ns_071.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Testing parameter type-hinted (array) with default value inside namespace
3: --FILE--
4: <?php
5:
6: namespace foo;
7:
8: class bar {
9: public function __construct(array $x = NULL) {
10: var_dump($x);
11: }
12: }
13:
14: new bar(null);
15: new bar(new \stdclass);
16:
17: ?>
18: --EXPECTF--
19: NULL
20:
1.1.1.2 ! misho 21: Catchable fatal error: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>