Wie greife ich auf ein statisches Mitglied einer Klasse zu?
Ich versuche, auf ein statisches Mitglied einer Klasse zuzugreifen.
eine Klasse ist:
class A
{
public static $strName = 'A is my name'
public function xyz()
{
..
}
..
}
//Since I have bunch of classes stored in an array
$x = array('A');
echo $x::$strName;
Ich erhalte eine Fehlermeldung beim Drucken. Wie kann ich drucken 'A ist mein Name'