global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / interface4.php
blob94d10dc43f56faee2446a18b6ee75abe426c4b94
1 <?hh
3 // disable array -> "Array" conversion notice
4 error_reporting(error_reporting() & ~E_NOTICE);
6 interface I {
7 function foo($x, $y=0);
9 interface J {
10 function foo($x, $y);
12 interface K {
13 function foo($x, $y=0, array $z);
15 interface L {
16 function foo($x, $y, array $z=null);
18 interface M {
19 function foo($x, $y=0, array $z=array());
21 class C implements I, J, K, L, M {
22 public function foo($x, $y=0, array $z=null, array $a=null) {
23 echo "$x $y $z\n";
26 $obj = new C;
27 $obj->foo(1);
28 $obj->foo(1, 2);
29 $obj->foo(1, 2, null);
30 $obj->foo(1, 2, array());