A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
2 of 2 added 88 characters in body

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];

You can also directly dereference array declarations:

echo [1, 2, 3, 4, 5][$n];