Chaining result of a function? Since when is this possible?
<p>I was quite amazed when I erroneously typed what I believed would raise an error:</p>

<pre><code>function r() { return array( 'foo' ); }
echo r()[0];
</code></pre>

<p>To my amazement, it worked and didn't even raise a notice. I remember not being able to do this when I first tried, and I noticed that on Codepad <a href="http://codepad.org/h9Ei0Vly" rel="nofollow">an error was raised</a>. I am running PHP 5.4.4 and am wondering when this functionality was added and where I can read more about it. Google only showed results for <em>PHP 5 Method Chaining</em>, but I suppose this is something else?</p>
