title: PHP function return not assigned to variable
body: <p>I have a function that boils down to something like this:</p>
  
  <pre><code>function do_something_cool() {
      return array(
          'key1' =&gt; 'value1',
          'key2' =&gt; 'value2',
      );
  }
  </code></pre>
  
  <p>Then, later on in the file, these four lines:</p>
  
  <pre><code>$var1 = array();
  $var1 = do_something_cool();
  print_r(do_something_cool());
  print_r($var1);
  </code></pre>
  
  <p>The array returned by the function is only printed when I directly print out the return, printing the variable results in an empty array.</p>
  
  <p>I have also tried using array_merge to assign the array, no luck.</p>
  
  <p>I don't even know where to start figuring out what's going on.</p>
  
  <p>Thank you in advance. :)</p>