Usually, it is sufficient to deconstruct in reverse construction order in this case:
$obj=PLA; $container=...;
Hence, destruction order is $container, $obj -- no problem (unless you're dealing with circular references, which actually are the problem I think).
Yeah, but 'usually' doesn't cut it... If someone does $container=...; $obj = $container->getFoo();
then you're screwed with that solution. And it's not as if it's that rare...
Zeev
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php