<?php register_shutdown_function(function() { echo "first shutdown\n"; }); final class Another { public function __destruct() { //exit(); //throw new \RuntimeException('test'); } } final class Logger { public function __construct() { register_shutdown_function(function () { echo "shutdown\n"; }); } public function __destruct() { echo "destruct\n"; } } new Another(); new Logger(); register_shutdown_function(function() { echo "second shutdown\n"; }); 42/0;
You have javascript disabled. You will not be able to edit any code.