private static function remove() { array_pop(self::$currentHandlerStack); // uninstall error handlers restore_error_handler(); if (empty(self::$currentHandlerStack)) { self::$shutdownErrorDetectorEnabled = false; } }