Arquivos
hhvm/hphp/test/vm/interface4.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

27 linhas
477 B
PHP

<?php
interface I {
function foo($x, $y=0);
}
interface J {
function foo($x, $y);
}
interface K {
function foo($x, $y=0, array $z);
}
interface L {
function foo($x, $y, array $z=null);
}
interface M {
function foo($x, $y=0, array $z=array());
}
class C implements I, J, K, L, M {
public function foo($x, $y=0, array $z=null, array $a=null) {
echo "$x $y $z\n";
}
}
$obj = new C;
$obj->foo(1);
$obj->foo(1, 2);
$obj->foo(1, 2, null);
$obj->foo(1, 2, array());