Hello Pierre, it is neither a core feature nor does it blong into the engine. And the real solution would be: - proxies (object, property), (object, array index) - another interface, say ArrayAccessByRef which allows to deal with references, a few things can be done automatically but you can never solve all issues - unless you're using proxies - also another interface for IteratorByRef that has function &__current() might be interesting
Now the proxies caneasily be done in userspace once we have the ability to overload get/set - i am actually thinking of doing something in pecl/spl_types. And later might be done in the engine completely. The interfaces however clearly belong into the engine. best regards marcus Wednesday, June 6, 2007, 9:02:00 AM, you wrote: > On 6/5/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: >> >> Could you elaborate - which bugs? >> > >> > A rude explanation was here: >> > >> > http://blog.thepimp.net/index.php/post/2006/11/28/comment-posting-fixed-and-warning-removed-and-some-overload-mess >> >> I'm not sure I understand where is the bug. If your __get doesn't return >> by reference, it can't be modified. That's how it's supposed to work. If >> it returns by ref, it works. > Please check the bugs database. There was numerous reports about this > problem and there is no solution to use an object instead of an array > (object being reference, that solves the issue). It is far from > obvious that the current behavior is correct, read: it is not correct. > However, I'm not arguing about why or how this bug should be fixed but > that the only work 'round is in SPL. ArrayObject (and related) must be > in Zend, it is a core feature. > --Pierre Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php