It's worth noting that the PHP devs *did* fix the issue brought up in Sam's comment in 2013 (per the comment thread in his link here: https://bugs.php.net/bug.php?id=34783#1366088374), since at least PHP 5.3.8.
So, you *can* (and in most cases should) overload offsetGet with reference syntax to get expected functionality:
<?php
class myArrayType extends ArrayAccess {
public function &offsetGet($index) {
// ...
}
}
?>