title: Force results of func_get_args() to be an associative array instead of 0-index
body: <p>Was wondering if it's possible to make a call like <code>func_get_args()</code> (<a href="http://us.php.net/func_get_args" rel="noreferrer">reference</a>) but instead of resulting in a 0-index array, result in an associative array, using the variable names as the keys?</p>
  
  <p>For example:</p>
  
  <pre><code>function foo($arg1, $arg2)
  {
      var_dump(func_get_args());
  }
  
  foo('bar1', 'bar2');
  
  // Output
  array(2) {
    [0]=&gt;
    string(4) "bar1"
    [1]=&gt;
    string(4) "bar2"
  }
  
  // Preferred
  array(2) {
    [arg1]=&gt;
    string(4) "bar1"
    [arg2]=&gt;
    string(4) "bar2"
  }
  </code></pre>
  
  <p>The reason I ask, is I need to validate that these args, passed as an array, to a RPC function, are actually populated. And it seems to be it's better to be specific about the contents rather than hoping they were passed in correct order:</p>
  
  <pre><code>// Now
  if (array_key_exists(0, $args)) {
  
  // Preferred
  if (array_key_exists('arg1', $args)) {
  </code></pre>
  
  <p>It would be easy for me to create an assoc array from the args passed in to the original function before passing off to RPC, but was just wondering if there were an already compiled function to do it for me. </p>
  
  <p>Thanks.</p>
  
  <p>-- Edit --</p>
  
  <p>Sorry, I forgot to mention that the code I am touching already exists, which means I cannot change the function signature. </p>