It just came up because someone who liked using object/method-chaining wondered if there was some way to do it with an array returned from a function. I.e., in a purely OOP context, you can chain object methods/properties, as long as each is (returns, in the case of a method) an object (with the exception of the last element in the chain, which does not have to be):
$foo = new Foo();
echo $foo->someMethod()->propertyOfThatReturnedObject->methodInThatObject()->propertyOfThisLatestObject;
So, assume "methodInThatObject()" returned an array instead of an object, you cannot do:
$foo = new Foo();
echo $foo->someMethod()->propertyOfThatReturnedObject->methodInThatObject()['some_key'];
You would instead have to do
$foo = new Foo();
$result = $foo->someMethod()->propertyOfThatReturnedObject->methodInThatObject();
echo $result['some_key'];
I'm personally not really concerned about this, I just found it an interesting thought experiment or whatever you want to call it, and was somewhat surprised that my "solution" worked -- but I doubt there would be enough cases where I'd feel it saved me anything, and can be completely avoided by taking a fully OOP approach and dealing with an object instead of an array in the first place.