[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-26 Thread Daniel Schierbeck
Daniel Schierbeck wrote: public static function getData () Ooops, the method shouldn't have been static :) -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/register&r=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Greg Beaver
Francisco M. Marzoa Alonso wrote: I've code like follows: class TestClass { public static $Data = 'This is the data'; } $Obj = new TestClass (); $ClassName = get_class ($Obj); echo $ClassName::$Data; ?> http://www.php.net/manual/en/language.oop5.reflection.php class TestClass { public stati

[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Daniel Schierbeck
Francisco M. Marzoa Alonso wrote: I've code like follows: class TestClass { public static $Data = 'This is the data'; } $Obj = new TestClass (); $ClassName = get_class ($Obj); echo $ClassName::$Data; ?> It gives me an error like: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM ... I