Note that the ReflectionFunctionAbstract::getParameters() method will return the parameters in the correct order.
(PHP 5 >= 5.2.3, PHP 7)
ReflectionParameter::getPosition — Gets parameter position
Gets the position of the parameter.
This function has no parameters.
The position of the parameter, left to right, starting at position #0.
Note that the ReflectionFunctionAbstract::getParameters() method will return the parameters in the correct order.