- print_r: documentation ( source)
- get_object_vars: documentation ( source)
<?php
class Potatoe {
public $skin;
protected $meat;
private $roots;
function __construct ( $s, $m, $r ) {
$this->skin = $s;
$this->meat = $m;
$this->roots = $r;
}
}
$a = new Potatoe(1,2,3);
$vars = get_object_vars ( $Obj );
print_r ( $vars );