hi! On Sat, Aug 9, 2008 at 1:50 AM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > Hi! > >> I know that we don't like to add new magic methods, but this case >> seems to require new ones. What's about __getByRef (and its setter >> equivalent if it is also not supported yet)? > > Why would we need that? We already have perfectly good __get, which can > perfectly return by-ref. The question is only if we allow override __get > that was declared by-val with __get that is declared by-ref.
I'm not sure to like the idea. I'm not a fan of OO strictness but I'd to agree with Marcus, I do not expect a reference from an overrided __get. There is also the problem with internal classes, if I'm not mistaken. > As for __set, __set doesn't return anything at all, so it's not very > relevant anyway. I meant set by reference. Is it not the same problem? class foo {function __set($key, &$value) {}} >> fatal error Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php