I want to convert the arguments to a function into an associative array with keys equal to the parameter variable names, and values equal to the parameter values.
PHP:
function my_function($a, $b, $c) {
// <--- magic goes here to create the $params array
var_dump($params['a'] === $a); // Should result in bool(true)
var_dump($params['b'] === $b); // Should result in bool(true)
var_dump($params['c'] === $c); // Should result in bool(true)
}
How can I do this?