Re: late static binding php6

From: Date: Tue, 20 Nov 2007 02:49:51 +0000
Subject: Re: late static binding php6
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-33352@lists.php.net to get a copy of this message
       parent::test();
What do you want parent::test() to mean?
This will echo 'A'. So like I said you have no way here of telling that B:: was used.
Because it wasn't. parent::test() means A::test(). 'parent::' means 'parent class of the class where this statement is' in PHP. For B, it's A.
Then there are two problems (sort of). First problem being, then why bother with lsb, you can do this already (which more so a 'wth' as
If you can do it - do it.
opposed to a problem.) The second and much more prevelent problem is that iirc you cannot do this kind of loose inheritance with statics in
What is 'loose inheritance'? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#33352) next »