Is it correct?

From: Date: Sun, 20 Aug 2000 19:23:18 +0000
Subject: Is it correct?
Groups: php.general 
Request: Send a blank email to php-general+get-12663@lists.php.net to get a copy of this message
Hello, I've defined the following class: class a { var $myvar_a; function a() { $this->myvar_a=1; } } class b { var $myvar_b; function b() { $this->myvar_b=new a(); } } then if I run the following code... $myClass=new b(); echo("myvar_a: $myClass->myvar_b->myvar_a <br>"); echo("myvar_a: " . $myClass->myvar_b->myvar_a . " <br>"); ... I obtain: myvar_a: Object->myvar_a myvar_a: 1 I'm expecting to get "myvar_a=1" from both statement. Is it correct? Bye Darvin

« previous php.general (#12663) next »