How to find number of variables passed in function in php [closed]

Now there is another function xyz in want to know number of variables that are need to be passed in this function.

Use this:

$rfunc = new ReflectionFunction('xyz');
echo $rfunc->getNumberOfRequiredParameters();

But I do not know for what this should be useful…

Leave a Comment