Re: by-ref return & inheritance

From: Date: Fri, 08 Aug 2008 22:40:34 +0000
Subject: Re: by-ref return & inheritance
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-39783@lists.php.net to get a copy of this message
Hi!
Yes, it breaks the principle. E.g. caller knows callee returns by ref - you break this, as easy as that.
I'm sorry I think you misunderstood my proposal. I proposed allowing overriding this: public function __get($name) with this: public function &__get($name) but not the reverse. So if the caller known callee returns by ref - it means it already expects the child class, not the parent class. Thus, it does not break anything. Is there any other problem that you see? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#39783) next »