- implode: documentation ( source)
<?php
$func = function(array $a, $b){ echo implode(' ', func_get_args()); };
$closure = &$func;
$reflection = new ReflectionFunction($closure);
$arguments = $reflection->getParameters();
if($arguments && $arguments[0]->isArray()){
echo 'Giving array. Result: ';
call_user_func($closure, ['a' => 5, 'b' => 10]);
} else {
echo 'Giving individuals. Result: ';
call_user_func($closure, 5, 10);
}