- var_dump: documentation ( source)
<?php
class Foo {
private $test;
public function getTest()
{
return $this->test;
}
public function setTest($test)
{
$this->test = $test;
}
}
$foo = new Foo;
$foo->setTest('test');
$bar = (array) $foo;
var_dump($bar);