public static function register_shutdown_function($callback = null) { if (!$callback) { return; } self::$shutdownFunction = $callback; }