- print_r: documentation ( source)
- get_object_vars: documentation ( source)
- array_pop: documentation ( source)
<?php
class foo
{
protected $bar = array('baz');
function bar()
{
array_pop($this->bar);
$vars = get_object_vars($this);
print_r($vars);
$this->bar[] = array('buz');
print_r($vars);
}
}
$f = new foo();
$f->bar();