Re: by-ref return & inheritance
| From: | Marcus Boerger | Date: | Fri, 08 Aug 2008 22:05:21 +0000 |
| Subject: | Re: by-ref return & inheritance | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39779@lists.php.net to get a copy of this message | ||
Hello Stanislav,
I think we may want to stick to our is-a mantra.
marcus
Friday, August 8, 2008, 10:32:53 PM, you wrote:
> Hi!
> Right now, strict inheritance rules do not allow to override
> public function __get($name)
> with
> public function & __get($name)
> I think we may want to allow this (but not the reverse - overriding
> by-ref return with by-val should not be allowed). Since by-ref return
> still can be used in by-val context, it should not break the LSP. And it
> can be useful in some situations - __get having specific by-ref
> semantics is one of them.
> What do you think?
> --
> Stanislav Malyshev, Zend Software Architect
> stas@zend.com http://www.zend.com/
> (408)253-8829 MSN: stas@zend.com
Best regards,
Marcus