- var_dump: documentation ( source)
<?php
class foo {
private $bar;
function __construct () {
$this->bar = 1;
}
function add() {
$this->bar+=1;
}
}
$one = $two = $three = new foo();
$two->add();
$three->add()->add();
var_dump($one);
var_dump($two);