note 56154 added to language.oop5.abstract
| From: | GoldoRaF at osu1 dot php dot net | Date: | Thu, 25 Aug 2005 07:30:28 +0000 |
| Subject: | note 56154 added to language.oop5.abstract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94168@lists.php.net to get a copy of this message | ||
I strongly disagree with Richard. With PHP 5.0.4, this example works perfectly :
abstract class base
{
public function base_function()
{
return $this->abs_fn();
}
abstract protected function abs_fn();
}
class super extends base
{
public function abs_fn()
{
return 3;
}
}
$test = new super();
echo $test->base_function(); // will print "3"
----
Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56154
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56154&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56154&report=yes
Search -- http://master.php.net/manage/user-notes.php