This is an extension question of PHP pass in $this to function outside class
And I believe this is what I\'m looking for but it\'s in python not php: Programmaticall
Use Reflection, especially ReflectionFunction in your case.
$fct = new ReflectionFunction('client_func'); echo $fct->getNumberOfRequiredParameters();
As far as I can see you will find getParameters() useful too