Background
In every other programming language I use on a regular basis, it is simple to operate on the return value of a function without declaring
This is too far-fetched, but if you really NEED it to be in one line:
return index0( $foo->getBarArray() ); /* ... */ function index0( $some_array ) { return $some_array[0]; }