public function handlePHPShutdown()
    {
        
        $error = error_get_last();
        if (($error['type'] & (E_COMPILE_ERROR | E_ERROR | E_PARSE | E_CORE_ERROR)) != 0) {
            $msg = (isset($error['file']) && isset($error['line']))
               ? 'php error('.$error['type'].') in '.$error['file'].'@'.$error['line'].': '.$error['message']
               : 'php error('.$error['type'].'): '.$error['message'];
            self::singleton()->log(self::FATAL_LEVEL, $msg, array('PHPERROR'));
        }
        
    }
public function handlePHPShutdown()
    {
        
        $error = error_get_last();
        if (($error['type'] & (E_COMPILE_ERROR | E_ERROR | E_PARSE | E_CORE_ERROR)) != 0) {
            $msg = (isset($error['file']) && isset($error['line']))
               ? 'php error('.$error['type'].') in '.$error['file'].'@'.$error['line'].': '.$error['message']
               : 'php error('.$error['type'].'): '.$error['message'];
            self::singleton()->log(self::FATAL_LEVEL, $msg, array('PHPERROR'));
        }
        
    }
public function handlePHPShutdown ( ) { $ error = error_get_last ( ) ; if ( ( $ error [ 'type' ] & ( E_COMPILE_ERROR | E_ERROR | E_PARSE | E_CORE_ERROR ) ) != 0 ) { $ msg = ( isset ( $ error [ 'file' ] ) && isset ( $ error [ 'line' ] ) ) ? 'php error(' . $ error [ 'type' ] . ') in ' . $ error [ 'file' ] . '@' . $ error [ 'line' ] . ': ' . $ error [ 'message' ] : 'php error(' . $ error [ 'type' ] . '): ' . $ error [ 'message' ] ; self :: singleton ( ) -> log ( self :: FATAL_LEVEL , $ msg , array ( 'PHPERROR' ) ) ; } }
a workaround to catch fatal errors by handling the php shutdown,
should never be called manually

@access public
@author Joel Bout, <joel.bout@tudor.lu>
@return mixed
a workaround to catch fatal errors by handling the php shutdown should never be called manually