5.4 Late static binding using "this" without "$" (or perhaps with a different name)
The same example, but now with the call to "self::static2()" replaced with "static::static2()", will then print "B::static2". Using static::func() is a bit corny, I understand why you don't want another new keyword so here is a few more suggestions: class::func() default::func() final::func() I personally think the class:: would be a better solution than static::, although this:: is the best solution, can I ask why that was ruled out since the title of the section indicates it was the first preference. Thanks Bob Silva > -----Original Message----- > From: Marcus Boerger [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 22, 2005 2:45 PM > To: Matthias Pigulla > Cc: internals > Subject: Re: AW: [PHP-DEV] PDM Meeting Notes > > Hello Matthias, > > Tuesday, November 22, 2005, 9:22:16 PM, you wrote: > > >> 2.10 Dynamic class inheritance > > > Can someone elaborate a little on what this is supposed to be ;)? > > Binding static members at run time rather than compile time. See the notes > for an example that shows the difference. Usage example again factories. > > >> 5.3 Implement inheritance rules for type hints > >> Issue: Currently we don't check inheritance rules for type-hinted > >> parameters. > > > Could someone please explain what exactly is/is not checked? > > From a typesystem point of view it would be perfectly leagal to change the > typehint in a derived class as long as that respects is-a relation with > the > parent. Since the explanation is a bit complex, not what most people > expect > we live with the simple disagreement. And since most languages do not > respect this correct or not at all anyway there is obviously no real > common > usecase for it. So PHP can live without that too (imo). > > Best regards, > Marcus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php