public function shutdown()
    {

        // check if there was a fatal error caused shutdown
        if ($lastError = error_get_last()) {
            // initialize error type and message
            $type = 0;
            $message = '';
            // extract the last error values
            extract($lastError);
            // query whether we've a fatal/user error
            if ($type === E_ERROR || $type === E_USER_ERROR) {
                LoggerUtils::log(LogLevel::CRITICAL, $message);
            }
        }
    }
public function shutdown()
    {

        // check if there was a fatal error caused shutdown
        if ($lastError = error_get_last()) {
            // initialize error type and message
            $type = 0;
            $message = '';
            // extract the last error values
            extract($lastError);
            // query whether we've a fatal/user error
            if ($type === E_ERROR || $type === E_USER_ERROR) {
                LoggerUtils::log(LogLevel::CRITICAL, $message);
            }
        }
    }
public function shutdown ( ) { // check if there was a fatal error caused shutdown if ( $ lastError = error_get_last ( ) ) { // initialize error type and message $ type = 0 ; $ message = '' ; // extract the last error values extract ( $ lastError ) ; // query whether we've a fatal/user error if ( $ type === E_ERROR || $ type === E_USER_ERROR ) { LoggerUtils :: log ( LogLevel :: CRITICAL , $ message ) ; } } }
Shutdown function to log unexpected errors.

@return void
@see http://php.net/register_shutdown_function
Shutdown function to log unexpected errors .