Re: RfC: rethink OO inheritance strictness
| From: | Pierre | Date: | Wed, 02 Aug 2006 15:22:24 +0000 |
| Subject: | Re: RfC: rethink OO inheritance strictness | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25134@lists.php.net to get a copy of this message | ||
On 8/2/06, Robert Cummings <robert@interjinn.com> wrote:
On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote: On Wed, 2 Aug 2006, Zeev Suraski wrote:Except that I would prefer the other way 'round. The default should be the "loose one". --PierreMy recommendation: - Add a new flag to methods (at the implementation level) that will allow to flag them as 'strict'Have an example of what you mean here? Maybe something like the following... <? class foo {function bleh( $p1, $p2 ) { echo "Bleh: $p1, $p2\n"; }} class fee extends foo {loose function bleh( $p1 ) { parent::bleh( $p1, $this->prop ); }} ?> I think I like it :D In this case,