Is it possible to get an associative parameter array for a function defined without predefined function parameters.
Lets assume the following function:
function foo()
{
print_r(func_get_args());
}
Example:
$a = "bar";
$b = "baz";
foo($a, $b);
Results in:
Array
(
[0] => "bar"
[1] => "baz"
)
The desired outcome would be:
Array
(
[a] => "bar"
[b] => "baz"
)
Tried so far:
PHP's ReflectionFunction will only return foo's predefined parameters, not its dynamically defined parameters.