title: selecting array for array_push using Ternary Operator
body: <p>I have two arrays and I want to append to one or another based on a certain condition. The problem is that the array_push function should be called inside cases of a switch case inside a foreach loop, so using if-else means 20 extra lines of code. I thought I could do this using the Ternary Operator, but for some reason it doesn't work.</p>
  <pre><code>$arr1 = ['1', '2'];
  $arr2 = ['a', 'b'];
  $condition = False;
  array_push($condition ? $arr1 : $arr2, 'new');
  </code></pre>
  <p>which produces this error:
  <code>array_push(): Argument #1 ($array) cannot be passed by reference</code></p>
  <p>I thought $arr1 and $arr2 are references, and therefore you should be able to pass them, but something is not as it should be. At least that's how it behaves in C.</p>