Hi,
Is there a way to detect the number of arguments a function in a class has?
What I want to do is the following.
$class = 'foo';
$path = 'path/to/file';
if ( ! file_exists($path)) {
die();
}
require($path);
if ( ! class_exists($class)) {
die();
}
$c = new class;
if (num_function_args($class, $function) == count($url_segments)) {
$c->$function($one, $two, $three);
}
Is this possible?