note 101008 modified in language.oop5.interfaces by danbrown
| From: | danbrown@php.net | Date: | Fri, 19 Nov 2010 19:11:26 +0000 |
| Subject: | note 101008 modified in language.oop5.interfaces by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174210@lists.php.net to get a copy of this message | ||
here is my simply method muliple inheritence with __construct function..
<?php
class foo {
protected $mam = 'mamam';
function __construct() {
echo 'foo';
}
}
class bar extends foo {
function __construct() {
parent:: __construct();
echo 'bar';
}
}
class foobar extends bar {
function __construct() {
parent:: __construct();
echo 'foobar';
}
}
$foo = new foobar();
?>
--was--
here is my simply method muliple inheritence with __construct function..
<?php
class foo {
protected $mam = 'mamam';
function __construct() {
echo 'foo';
}
}
class bar extends foo {
function __construct() {
parent:: __construct();
echo 'bar';
}
}
class foobar extends bar {
function __construct() {
parent:: __construct();
echo 'foobar';
}
}
$foo = new foobar();
http://php.net/manual/en/language.oop5.interfaces.php