- var_dump: documentation ( source)
<?php
class Test {
private $a='data';
protected $b=123;
public $c=true;
}
$a = new Test;
$hydrated = (new ReflectionFunction('get_object_vars'))->getClosure()->bindTo($a, 'Test');
$data = $hydrated($a);
var_dump($data);