- var_dump: documentation ( source)
<?php
class ob {
private $b = false;
public function __construct($b=false) {
if ($b) $this->b = $b;
}
public function toString(){
return $b;
}
}
class b {}
$x = new b();
$ob = new ob();
$ob2 = new ob(true);
var_dump($x, $ob, $ob2);