This is a PHP extension issue pass to $ this for an outer class function
And I believe that this is what I am looking for, but it is in python, not php: Programmatically determining the number of parameters a function needs - Python
Say I have a function like this:
function client_func($cls, $arg){ }
and when I am ready to call this function, I can do something like this in pseudocode:
if function first parameter equals '$cls', then call client_func(instanceof class, $arg) else call client_func($arg)
So, in principle, there is a way to look at the function and see what parameter values ββare needed before calling the function.
I assume this will be similar to debug_backtrace, but vice versa.
func_get_args () can only be called inside a function that doesn't help me here.
Any thoughts?
source share