Description:
------------
Cannot use square brackets to directly reference array elements in the returned value of a function. As a flexible language that can do pretty much anything, it seems logical to be able to achieve this on one line, without having to first assign the return value to a temporary variable.
Reproduce code:
---------------
function test()
{
return array('a', 'b');
}
//desired
echo test()[0];
//workaround
//$temp = test();
//echo $temp[0];
Expected result:
----------------
a
Actual result:
--------------
Parse error: syntax error, unexpected '['