Re: late static binding php6
| From: | Gergely Hodicska | Date: | Wed, 21 Nov 2007 06:23:19 +0000 |
| Subject: | Re: late static binding php6 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33366@lists.php.net to get a copy of this message | ||
Hi!
What do you want parent::test() to mean? 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. When you use parent in your code you generally want to add some plus functionality to the parent class. But in this case if you use the parent the behavior of the parent class changes too.Best Regards, Felhő