note 80193 deleted from language.oop5 by felipe
| From: | felipe@php.net | Date: | Fri, 04 Jan 2008 01:35:02 +0000 |
| Subject: | note 80193 deleted from language.oop5 by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134738@lists.php.net to get a copy of this message | ||
Note Submitter: randallgirard at hotmail dot com
----
When stacking classes and calling with parent::, you don't have to specify a routine in the
'middle' classes
<?php
error_reporting(E_ALL);
class test1 {
function test() {
print("test1<br />");
}
}
class test2 extends test1 {
# NOTE: function test is not defined here
}
class test3 extends test2 {
function test() {
parent::test();
}
}
$obj = new test3();
$obj->test();
?>