Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If it is a class method, Reflection will do: php.net/manual/en/book.reflection.php , getParameters() method, if not, you can use this: https://github.com/nikic/PHP-Parser
The function does not require variable names, but parameters.
It will use variable names internally, denoting the data that you passed to it during execution.
In the example below, I am calling the foo function with x,y arguments. The function itself will be called and the values stored in x and y will be interpreted as a, b, because it does not know what xy is
x=1
y=2
foo(x,y)
function foo (a, b)
{
print a, b
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question