On Wed, 06 Feb 2013 17:47:15 +0100, Anthony Ferrara <ircmax...@gmail.com>
wrote:
Perhaps there's another way out of this. A simple way would be to
introduce an ArrayAccessReference interface in core that adds the
references to the
getters/setters...
It's perhaps not the cleanest, but it solves the BC issues...
How would this solve anything? The BC problem is that ArrayObject doesn't
return by reference. If we made it return by reference, almost all* the
now valid subclasses that also do not return by reference would issue an
E_STRICT.
*"almost" because you can override ArrayObject's offsetGet and return by
reference. Those would be compatible with the modification in ArrayObject.
We've allowed overrides to return by reference when the parent doesn't for
quite a while now.
--
Gustavo Lopes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php