Annotation of embedaddon/php/Zend/tests/ns_074.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing type-hinted lambda parameter inside namespace
! 3: --FILE--
! 4: <?php
! 5:
! 6: namespace foo;
! 7:
! 8: $x = function (\stdclass $x = NULL) {
! 9: var_dump($x);
! 10: };
! 11:
! 12: class stdclass extends \stdclass { }
! 13:
! 14: $x(NULL);
! 15: $x(new stdclass);
! 16: $x(new \stdclass);
! 17:
! 18: ?>
! 19: --EXPECTF--
! 20: NULL
! 21: object(foo\stdclass)#%d (0) {
! 22: }
! 23: object(stdClass)#%d (0) {
! 24: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>