PHP 8.4.24 Released!

Voting

: six plus two?
(Example: nine)

The Note You're Voting On

joelhy
15 years ago
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();
?>

<< Back to user notes page

To Top