<?php class A { function __destruct() { echo "a dtor\n"; $GLOBALS['b']->doSomething(); } } class B { function __destruct() { echo "b dtor\n"; } function doSomething() { echo "b still alive\n"; } } $b = new B; $a = new A;
You have javascript disabled. You will not be able to edit any code.