這是不行的:
class MyClass
{
public function vlal0(...$var1, $var2)
{
print_r($var1);
print_r($var2);
}
}
$c = new MyClass();
$c->vlal0(1,2,3,4, var2:'test');
因為:PHP Fatal error: Only the last parameter can be variadic...