xref: /PHP-5.6/tests/lang/type_hints_002.phpt (revision 23b97b25)
1--TEST--
2ZE2 type hinting
3--SKIPIF--
4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
5--FILE--
6<?php
7class P { }
8class 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--
21object(P)#2 (0) {
22}
23-
24NULL
25-
26NULL
27-
28
29