- var_dump: documentation ( source)
<?php
class Foo {
protected $bar = 'test';
public function __get($property) {
return isset($this->$property) ? $this->$property : null;
}
}
$foo = new Foo();
var_dump($foo->bar);
$foo->bar = 'mest';
var_dump($foo->bar);