In PHP Consider this function:
function test($name, $age) {}
I need to somehow extract the parameter names (for generating custom documenta
func_get_args
function my($aaa, $bbb){ var_dump( func_get_args() ); } my("something","something"); //result: array('aaa' => 'something', 'bbb' => 'something');
also, there exists another global functions: get_defined_vars(), that returns not only function, but all variables.
get_defined_vars()