We assume the following:
class a {
public static $foo = 'bar';
}
class b {
public $classname = 'a';
}
$b = new b();
Is it somehow (curly braces etc.) possible to access $foo directly without generating an "unexpected :: (T_PAAMAYIM_NEKUDOTAYIM)":
$b->classname::$foo //should result in "bar" not in an "unexpected :: (T_PAAMAYIM_NEKUDOTAYIM)"
I know and use the following workaround:
$c = $b->classname;
$c::$foo;
but I would like to know if it exists another nice way to do access $foo directly.