I have the following stucture
class Foo
{
public static $a = "parent";
public static function Load()
{
return static::$a;
}
public function Update()
{
return self::$a;
}
}
class Bar extends Foo
{
private static $a = "child";
}
I want the Update function to be able to return $a aswell, but I can't get it to work.
Bar::Load(); //returns child, Correct.
$bar = new Bar();
$bar->Update(); //returns parent, Wrong.
I've tried self:: , static:: and get_class() without success.