Annotation of embedaddon/php/tests/lang/type_hints_002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ZE2 type hinting
! 3: --SKIPIF--
! 4: <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
! 5: --FILE--
! 6: <?php
! 7: class P { }
! 8: class T {
! 9: function f(P $p = NULL) {
! 10: var_dump($p);
! 11: echo "-\n";
! 12: }
! 13: }
! 14:
! 15: $o=new T();
! 16: $o->f(new P);
! 17: $o->f();
! 18: $o->f(NULL);
! 19: ?>
! 20: --EXPECT--
! 21: object(P)#2 (0) {
! 22: }
! 23: -
! 24: NULL
! 25: -
! 26: NULL
! 27: -
! 28:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>