Re: parent::mymethod() call $this->mymethod() bug?
| From: | Tamas Arpad | Date: | Fri, 21 Sep 2001 13:56:25 +0000 |
| Subject: | Re: parent::mymethod() call $this->mymethod() bug? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68152@lists.php.net to get a copy of this message | ||
On Friday 21 September 2001 15:15, Jean-Pierre Arneodo wrote:
> Hi!
> something looks strange for me.
> Why the method Fils::x is called?
> class Fils extends Pere {
> function Fils(){
> echo "<br>Fils::Fils called";
> $this->Pere();
> }
> function x(){
> echo "<br>Fils::x called";
> parent::x();
> }
> function y(){
> parent::x();
> }
> }
>
> $f = new Fils();
> $f->x();
Because you called it here :))
Or am I missing something?
Arpi