note 33703 deleted from language.oop by aidan

From: Date: Sat, 03 Jul 2004 14:52:55 +0000
Subject: note 33703 deleted from language.oop by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72445@lists.php.net to get a copy of this message
Note Submitter: mazsolt@yahoo.com ---- The $this reference means the current object, which calls the function or property. If we call from the derived class with the :: operator a function defined in the base class , $this will represent the object of the derived class: class a{ var $a=1; function display(){ echo $this->a; } } class b extends a{ var $a=9; function disp(){ a::display(); } } $x=new b; $x->disp(); It will display 9.

« previous php.notes (#72445) next »