note 104208 added to language.oop5.abstract
| From: | joelhy at osu1 dot php dot net | Date: | Wed, 01 Jun 2011 02:23:08 +0000 |
| Subject: | note 104208 added to language.oop5.abstract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180153@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.44.83)
----
Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php
Edit -- https://master.php.net/note/edit/104208
Del: integrated -- https://master.php.net/note/delete/104208/integrated
Del: useless -- https://master.php.net/note/delete/104208/useless
Del: bad code -- https://master.php.net/note/delete/104208/bad+code
Del: spam -- https://master.php.net/note/delete/104208/spam
Del: non-english -- https://master.php.net/note/delete/104208/non-english
Del: in docs -- https://master.php.net/note/delete/104208/in+docs
Del: other reasons-- https://master.php.net/note/delete/104208
Reject -- https://master.php.net/note/reject/104208
Search -- https://master.php.net/manage/user-notes.php