<?php class X { public function a($x, $y = null) { } } $z = new ReflectionMethod('X', 'a'); $p = $z->getParameters();
Standard input is empty
array(2) {
[0]=>
&object(ReflectionParameter)#2 (1) {
["name"]=>
string(1) "x"
}
[1]=>
object(ReflectionParameter)#3 (1) {
["name"]=>
string(1) "y"
}
}
bool(true)