note 100991 deleted from language.oop5.inheritance by danbrown

From: Date: Fri, 19 Nov 2010 14:24:20 +0000
Subject: note 100991 deleted from language.oop5.inheritance by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174195@lists.php.net to get a copy of this message
Note Submitter: gratcypalma at gmail dot com ---- <?php /* here is the simply exampleof multiple inherinace */ class foo { protected $mam = 'mamam'; function __construct() { echo 'foo'; } } class bar extends foo { function __construct() { parent:: __construct(); echo 'bar'; } } class foobar extends bar { private static $start; public static function getInstance() { if (self::$start == NULL) { self::$start = new foobar(); } return self::$start; } function __construct() { parent::__construct(); echo 'foo bar'; echo $this -> mam; } } foobar::getInstance();

« previous php.notes (#174195) next »