summaryrefslogtreecommitdiff
path: root/tests/lang/type_hints_002.phpt
blob: cd348ebfb27215d84f4a6aa7e324a1da69495e79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
ZE2 type hinting
--FILE--
<?php
class P { }
class T {
	function f(P $p = NULL) {
		var_dump($p);
		echo "-\n";
	}
}

$o=new T();
$o->f(new P);
$o->f();
$o->f(NULL);
?>
--EXPECT--
object(P)#2 (0) {
}
-
NULL
-
NULL
-