src/debug/ErrorHandler.php
public static function setupErrorHandling($mode) {
        if     ($mode === self::LOG_ERRORS      ) self::$errorMode = self::LOG_ERRORS;
        elseif ($mode === self::THROW_EXCEPTIONS) self::$errorMode = self::THROW_EXCEPTIONS;
        else                                      return null;

        return set_error_handler(self::$errorHandler=__CLASS__.'::handleError', error_reporting());
    }
public static function setupErrorHandling($mode) {
        if     ($mode === self::LOG_ERRORS      ) self::$errorMode = self::LOG_ERRORS;
        elseif ($mode === self::THROW_EXCEPTIONS) self::$errorMode = self::THROW_EXCEPTIONS;
        else                                      return null;

        return set_error_handler(self::$errorHandler=__CLASS__.'::handleError', error_reporting());
    }
public static function setupErrorHandling ( $ mode ) { if ( $ mode === self :: LOG_ERRORS ) self :: $ errorMode = self :: LOG_ERRORS ; elseif ( $ mode === self :: THROW_EXCEPTIONS ) self :: $ errorMode = self :: THROW_EXCEPTIONS ; else return null ; return set_error_handler ( self :: $ errorHandler = __CLASS__ . '::handleError' , error_reporting ( ) ) ; }
Setup global error handling.

@param  int $mode - mode the error handler to setup for
can be either self::LOG_ERRORS or self::THROW_EXCEPTIONS

@return mixed - Returns a string containing the previously defined error handler (if any). If the passed $mode
parameter is invalid or if the built-in error handler was active NULL is returned. If the previous
error handler was a class method an indexed array with the class and the method name is returned.
Setup global error handling .