Untested, but seems like it should work to get a value from the middle:
$midValue = array_shift(array_slice(function_that_returns_array(), 2));
True that my function could return a FALSE element and give misleading results. However using the above code does not give an error if the required index does not exist, which might be what you want but is different behaviour from normal array referencing. Using this function:
function arrayElement($arr, $index)
accurately emulates the referencing of the array (or seems to) ie it will reference the element if it's there, otherwise kick off an error. And it circumvents the necessity of setting a variable for the array.
Naturally, if you're going to be referencing more than 1 element in the array you would set it to a variable. You pick that up pretty early in java type stuff.