- var_dump: documentation ( source)
<?php
class Tmp {
function __destruct() {
var_dump("destroying");
}
}
$tmp = new Tmp();
$fn = function () {
$tmp = 42;
var_dump("closure executed");
};
var_dump("closure defined");
unset($tmp);
var_dump("original var unset");
$fn();