title: Does function occur only once If defined to a variable?
body: <p>In case I have this function</p>
  
  <pre><code>&lt;?php
  function func() {
    return ['a', 'b', 'c'];
  }
  ?&gt;
  </code></pre>
  
  <p>If I called it like this</p>
  
  <pre><code>$array = func();
  echo $array[0].$array[1].$array[2];
  </code></pre>
  
  <p>Is the function called only <strong>once</strong> and <strong>copied</strong> into <code>$array</code>? Or is it called for each <code>$array[x]</code>?</p>
  
  <p>Is there any different from defining it like that and like this</p>
  
  <pre><code>echo func()[0].func()[1].func()[2];
  </code></pre>