Beispiel #1
0
    function setA($value)
    {
        self::$a = $value;
    }
    function getA()
    {
        return self::$a;
    }
    function foo()
    {
        return "statically";
    }
}
class K extends M
{
    static $a = 10;
    function getA()
    {
        return self::$a;
    }
}
$m = new M();
$k = new K();
echo $m->getA();
echo "<br>";
$k->setA(25);
echo $m->getA();
echo "<br>";
echo $k->getA();
echo "<br>";
echo M::foo();