- var_dump: documentation ( source)
<?php
class Foo
{
private static $var = 1;
public function __get($name)
{
return $this->$name;
}
public function __set($name, $value)
{
$this->$name = $value;
}
}
$f = new Foo;
echo $f->var;
$f->var = 2;
echo $f->var;
var_dump($f);