[PHP] Print extended/parent classes

2006-02-01 Thread Mathijs
I have the following situation : ?php class A { public $var1; } class B extends A { public $var2; } ? Now I want to print this object ?php $obj = new B; print_r($obj); ? Does anybody know how I can print class A also ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Print extended/parent classes

2006-02-01 Thread David Grant
Mathijs, Mathijs wrote: I have the following situation : ?php class A { public $var1; } class B extends A { public $var2; } ? Now I want to print this object ?php $obj = new B; print_r($obj); ? Does anybody know how I can print class A also ? The above prints out:

Re: [PHP] Print extended/parent classes

2006-02-01 Thread Jochem Maas
David Grant wrote: Mathijs, Mathijs wrote: I have the following situation : ?php class A { public $var1; } class B extends A { public $var2; } ? Now I want to print this object ***object*** ?php $obj = new B; print_r($obj); ? Does anybody know how I can print class A also

Re: [PHP] Print extended/parent classes

2006-02-01 Thread David Grant
Jochem, Good point. I thought he meant object given his example. :P David Jochem Maas wrote: David Grant wrote: Mathijs, Mathijs wrote: I have the following situation : ?php class A { public $var1; } class B extends A { public $var2; } ? Now I want to print this object