note 104207 added to language.oop5.abstract
| From: | joelhy at osu1 dot php dot net | Date: | Wed, 01 Jun 2011 02:23:03 +0000 |
| Subject: | note 104207 added to language.oop5.abstract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180152@lists.php.net to get a copy of this message | ||
The documentation says: "It is not allowed to create an instance of a class that has been
defined as abstract.". It only means you cannot initialize an object from an abstract class.
Invoking static method of abstract class is still feasible. For example:
<?php
abstract class Foo
{
static function bar()
{
echo "test\n";
}
}
Foo::bar();
?>
----
Server IP: 222.73.207.145
Probable Submitter: 127.0.0.1 (proxied: 74.125.64.84)
----
Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php
Edit -- https://master.php.net/note/edit/104207
Del: integrated -- https://master.php.net/note/delete/104207/integrated
Del: useless -- https://master.php.net/note/delete/104207/useless
Del: bad code -- https://master.php.net/note/delete/104207/bad+code
Del: spam -- https://master.php.net/note/delete/104207/spam
Del: non-english -- https://master.php.net/note/delete/104207/non-english
Del: in docs -- https://master.php.net/note/delete/104207/in+docs
Del: other reasons-- https://master.php.net/note/delete/104207
Reject -- https://master.php.net/note/reject/104207
Search -- https://master.php.net/manage/user-notes.php