1 of 2

Directly dereference arrays returned from functions.

E.g., instead of this:

$a = foo();
echo $a[$n];

You can do:

echo foo()[$n];

This works with methods too:

echo $obj->foo()[$n];