I'm have code that return service description object for JSON-RPC and I have similar problem then this: PHP: Get number of parameters a function requires but instead of function I have a method.
function service_description($object) {
    $class = get_class($object);
    $methods = get_class_methods($class);
    $service = array("sdversion" => "1.0",
                     "name" => "DemoService",
                     "address" => $_SERVER['PHP_SELF'],
                     "id" => "urn:md5:" . md5($_SERVER['PHP_SELF']));
    foreach ($methods as $method) {
        $service['procs'][] = array(
            "name" => $method,
            "params" => ?????
        );
    }
    return $service;
}
How can I check parameters of each method?