protected function callfn($fn, $args) { if ($fn instanceof \Closure) { $bind = \array_shift($args); $fn = $fn->bindTo($bind); // It is faster than \call_user_func. return $fn(...$args); } return \call_user_func($fn, ...$args); }