I am wondering if you can get the argument length of a php functions arguments from an external scope.
$test = function($one, $two) {
// this will work inside the scope of the function
$length = func_num_args();
};
// I would like to access it from outside the functions scope
$length = get_arg_count(test); // => 2
If I var_dump(test) I can see a property on the Closure of properties but I can't get at it.
There is func_num_args(void) but that only works from inside the function scope.
I have tried...
test->properties;
test->properties();
test::properties;
test::properties();
test['properties'];