note 96039 added to migration52.incompatible
| From: | AlexanderSchuch at osu1 dot php dot net | Date: | Thu, 04 Feb 2010 14:42:56 +0000 |
| Subject: | note 96039 added to migration52.incompatible | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165657@lists.php.net to get a copy of this message | ||
If the sole reason for having "abstract static methods" is to force the implementation of
such a method in a child, consider using an interface for them. The abstract class implements the
interface, and a child class extends the base class and defines the "abstract static
methods".
<?php
interface I
{
static public function f();
}
abstract class C implements I
{
// more/other methods go here
}
class D extends C
{
static public function f()
{
echo 'I am f().';
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 84.188.166.70
----
Manual Page -- http://www.php.net/manual/en/migration52.incompatible.php
Edit -- https://master.php.net/note/edit/96039
Del: integrated -- https://master.php.net/note/delete/96039/integrated
Del: useless -- https://master.php.net/note/delete/96039/useless
Del: bad code -- https://master.php.net/note/delete/96039/bad+code
Del: spam -- https://master.php.net/note/delete/96039/spam
Del: non-english -- https://master.php.net/note/delete/96039/non-english
Del: in docs -- https://master.php.net/note/delete/96039/in+docs
Del: other reasons-- https://master.php.net/note/delete/96039
Reject -- https://master.php.net/note/reject/96039
Search -- https://master.php.net/manage/user-notes.php