title: IDE issue or genuine error?
body: <pre><code>public function first(){
          return $this-&gt;results()[0];
      }
  </code></pre>
  
  <p>My IDE (PHP Designer 8) flags (in red) the above function return line that gets the first value from the database however when I run it there are no errors thrown and it produces the expected results (see below). If I remove the [0] then the flag disappears. </p>
  
  <pre><code>stdClass Object ( 
    [id] =&gt; 2
    [username] =&gt; jhcorsair 
    [password] =&gt; b40ad7a04a1d37828697197d3eeb893a4aac4f6ba1e6cce3bb4bedeb6354e266 
    [salt] =&gt; N#ˆ˜ºÕJ(Ò³v^ºË,˜iÚ¢E\~£É±šé7Ô
    [name] =&gt; 0
    [joined] =&gt; 2014-09-16 06:24:55 
    [group] =&gt; 1 
  )
  </code></pre>
  
  <p>Is this truly a syntax error or an IDE issue?  </p>