I have an assoc array with a list of what are parameters to me. Here's an example:
array(
'param1' => 'value1',
'param4' => 'value4',
'param3' => 'value3',
'param2' => 'value2',
);
Note that they may come unsorted. Now, is there a way I can make a call (static or from an instance, using call_user_func_array or similar) and correctly pass each value to each parameter? Just to be sure, an example function I'd like to call using that parameter array is one such this:
exampleFunction($param1, $param2, $param3, $param4) {
...
}
PS: Reflection is great, but I'm concerned about execution times (which, at least, in Java tends to increase a lot when using Reflection). If you know any other way to do so, it would be awesome.