note 80193 added to language.oop5
| From: | randallgirard at hotmail dot com | Date: | Thu, 03 Jan 2008 19:33:52 +0000 |
| Subject: | note 80193 added to language.oop5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134727@lists.php.net to get a copy of this message | ||
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();
?>
----
Server IP: 208.69.120.35
Probable Submitter: 71.110.79.93
----
Manual Page -- http://www.php.net/manual/en/language.oop5.php
Edit -- https://master.php.net/note/edit/80193
Del: integrated -- https://master.php.net/note/delete/80193/integrated
Del: useless -- https://master.php.net/note/delete/80193/useless
Del: bad code -- https://master.php.net/note/delete/80193/bad+code
Del: spam -- https://master.php.net/note/delete/80193/spam
Del: non-english -- https://master.php.net/note/delete/80193/non-english
Del: in docs -- https://master.php.net/note/delete/80193/in+docs
Del: other reasons-- https://master.php.net/note/delete/80193
Reject -- https://master.php.net/note/reject/80193
Search -- https://master.php.net/manage/user-notes.php