Пример #1
0
<?php

class Base
{
    public static function __callStatic($method, $args)
    {
        $klass = get_called_class();
        echo "class {$klass}\n";
    }
}
class Derived extends Base
{
}
Base::foo();
Derived::foo();
Пример #2
0
<?php

abstract class Base
{
    public static function foo()
    {
        $a = 2;
        static::$x;
    }
}
class Derived extends Base
{
    public static $x;
}
$a = new Derived();
$a->foo();
echo "Done\n";