- var_export: documentation ( source)
<?php
class Foo {
protected $bar;
public function __get($name) {
return $this->{$name};
}
public function __construct($name) {
$this->name = $name;
}
}
$foo = new Foo('asdf');
var_export($foo->bar);