<?php
class MyDestructableClass {
function __construct() {
print "Конструктор\n";
$this->name = "MyDestructableClass";
}
function __destruct() {
print "Уничтожается " . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
//$arr = get_defined_vars();
//var_dump($arr);
?>
Cjw/cGhwCmNsYXNzIE15RGVzdHJ1Y3RhYmxlQ2xhc3MgewogICBmdW5jdGlvbiBfX2NvbnN0cnVjdCgpIHsKICAgICAgIHByaW50ICLQmtC+0L3RgdGC0YDRg9C60YLQvtGAXG4iOwogICAgICAgJHRoaXMtPm5hbWUgPSAiTXlEZXN0cnVjdGFibGVDbGFzcyI7CiAgIH0KCiAgIGZ1bmN0aW9uIF9fZGVzdHJ1Y3QoKSB7CiAgICAgICBwcmludCAi0KPQvdC40YfRgtC+0LbQsNC10YLRgdGPICIgLiAkdGhpcy0+bmFtZSAuICJcbiI7CiAgIH0KfQoKJG9iaiA9IG5ldyBNeURlc3RydWN0YWJsZUNsYXNzKCk7CgovLyRhcnIgPSBnZXRfZGVmaW5lZF92YXJzKCk7CgovL3Zhcl9kdW1wKCRhcnIpOwoKdmFyX2R1bXAoJG9iaik7Cgp1bnNldCgkb2JqKTsKCnZhcl9kdW1wKCRvYmopOwoKJGFyciA9IGdldF9kZWZpbmVkX3ZhcnMoKTsKCnZhcl9kdW1wKCRhcnIpOwo/Pgo=