Print extended/parent classes
| From: | Mathijs | Date: | Wed, 01 Feb 2006 11:27:44 +0000 |
| Subject: | Print extended/parent classes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229613@lists.php.net to get a copy of this message | ||
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 ?