Check your syntax!!!! I don't know how many times people have asked a question like this and they mess up the $'s
class test { static $foo = ''; } class test2 { var $how = 3; } $bar = new test2; test::$foo = $bar; echo "How ? ".test::$foo->how; where you had echo "How ? ".test::$foo->$how; now what php is trying to do here, is derefrence the local variable $how which has no value and then get the property of $foo with the value of nothing if you said $how = 'how'; then did echo "How ? ".test::$foo->$how; then you would get the correct output. Get it? - Brad --- Mickael BAILLY <[EMAIL PROTECTED]> wrote: > > Why can't I do this: > -- > class test { > static $foo = ''; > } > class test2 { > var $how = 3; > } > > $bar = new test2; > test::$foo = $bar; > > echo "How ? ".test::$foo->$bar; > -- > output gives me 'How ? ' > > Is it a PHP/ZE2 bug? If not, how to do that right ? > > -- > NetClub'ment votre > Mickael BAILLY > http://www.netclub.fr/ > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php