Arquivos
hhvm/hphp/test/quick/interface4.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07: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());