<?php
function foo($a, $b) {
var_dump(func_get_args());
}
$foo = foo(?, ?);
try {
$foo(1, 2, 3);
} catch (Error $ex) {
printf("%s\n", $ex->getMessage());
}
try {
$foo(1);
} catch (Error $ex) {
printf("%s\n", $ex->getMessage());
}
$foo = foo(?, ...);
try {
$foo();
} catch (Error $ex) {
printf("%s\n", $ex->getMessage());
}
$foo(1, 2, 3);
?>