title: PHP: Can I reference a single member of an array that is returned by a function?
body: <p>any idea how if the following is possible in PHP as a single line ?:</p>
  
  <pre><code>&lt;?php
  $firstElement = functionThatReturnsAnArray()[0];
  </code></pre>
  
  <p>... It doesn't seem to 'take'. I need to do this as a 2-stepper:</p>
  
  <pre><code>&lt;?php
  $allElements = functionThatReturnsAnArray();
  $firstElement = $allElements[0];
  </code></pre>
  
  <p>... just curious - other languages I play with allow things like this, and I'm lazy enoug to miss this in PHP ... any insight appreciated ...</p>