title: Pass by reference or return array in PHP?
body: <p>All of my functions that have multiple parameters and that need to return more than one of those values I return an <code>array</code> like so...</p>
  
  <pre><code>function eg($a, $b) {
      $a += 5;
      $b += 10;
      return array('a' =&gt; $a, 'b' =&gt; $b);
  }
  $no = eg(0, 5);
  echo $no['a']; // 5
  echo $no['b']; // 10
  </code></pre>
  
  <p>Is this considered bad practice compared to passing by reference ie;</p>
  
  <pre><code>function eg(&amp;$a, &amp;$b) {
      $a += 5;
      $b += 10;
  }  
  eg(0, 5);
  echo $a; // 5
  echo $b; // 10
  </code></pre>
  
  <p>Does this really matter? When would I want to use one over the other when using the examples above? Is there any difference in performance?</p>
  
  <p>Thanks</p>