- var_dump: documentation ( source)
<?php
$a = null;
class A extends DateTime {
public function __construct($d, $a) {
global $a;
$a = $this;
throw new Exception("what?");
}
public function __destruct() {
echo "called\n";
}
}
try {
$x = new A();
}
catch(Exception $e) {
}
var_dump($a);