Annotation of embedaddon/php/Zend/tests/bug43332_2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #43332.2 (self and parent as type hint in namespace)
! 3: --FILE--
! 4: <?php
! 5: namespace foobar;
! 6:
! 7: class foo {
! 8: public function bar(\self $a) { }
! 9: }
! 10:
! 11: $foo = new foo;
! 12: $foo->bar($foo); // Ok!
! 13: $foo->bar(new stdclass); // Error, ok!
! 14: --EXPECTF--
! 15: Fatal error: '\self' is an invalid class name in %sbug43332_2.php on line 5
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>