; , . , .
$b->__destruct()
$b->this_
, $b
.
script, Zend Engine , , , , , .. $b
, $b->this_
Engine .
, $b
, - A
.
There is no hindrance to destroying an object manually, and it frees up its resources (if the object is not shared, and then the GC will not destroy it, if there are no more links on it, in PHP there are no weak links).
GC working example:
http://codepad.org/7JDBoOKY
Objects are destroyed before the code completes. If this were not so, then the output order would be inverted.
ssice source
share