note 29834 added to keyword.extends
| From: | j237fl at hotmail dot com | Date: | Wed, 26 Feb 2003 12:28:25 +0000 |
| Subject: | note 29834 added to keyword.extends | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44552@lists.php.net to get a copy of this message | ||
This code fragment does NOT seem to work. It seems as though, the PHP engine when loading a class
dosen't set the member vars FIRST, it seems as though it loads the BasicLife member vars before
the Super Class methods.
class BasicLife extends Benefit{
//MEMBER VAR simply REFERS TO METHOD OF SUPER CLASS
var $simply = Benefit::get_simply();
//MEMBER VAR me REFERS TO METHOD OF THIS->CLASS
var $me = $this->get_me();
function BasicLife(){//CONSTRUCTOR}
function get_me(){}
}
--
http://www.php.net/manual/en/keyword.extends.php
http://master.php.net/manage/user-notes.php?action=edit+29834
http://master.php.net/manage/user-notes.php?action=delete+29834
http://master.php.net/manage/user-notes.php?action=reject+29834