"Directly accessing" return values without referencing
- by undocumented feature
Look at this ruby example:
puts ["Dog","Cat","Gates"].1
This will output Cat as ruby allows me to directly access the "anonymous" array created.
If I try this in PHP, however:
echo array("Dog","Cat,"Gates")[1]
This won't work.
What is this called, not only concerning arrays but all functions?
Where else is it possible?
Feel free to change the question title when you know how this "feature" is called.