A problem about source code in thinkphp5

1, question

when I was in the source code of tp5.1, when I saw registration errors and exception handling mechanism, I saw a piece of code in error.php that I didn"t quite understand

.
public static function appError($errno, $errstr, $errfile = "", $errline = 0)
    {
        $exception = new ErrorException($errno, $errstr, $errfile, $errline);
        if (error_reporting() & $errno) {
            //  think\exception\ErrorException
            throw $exception;
        }

        self::getExceptionHandler()->report($exception);
    }

this is the handler of error, and
I particularly don"t understand the paragraph if (error_reporting () & $errno) .

What is the significance of

this bit operation here?

May.22,2021

the function of the whole code is to convert the error you are concerned about into exception handling, otherwise, if an error occurs, it will follow the error handling process: log, and in the exception handling process, in addition to logging, it will also send the corresponding response to the client. The bit operation is used to determine whether the error is the error you are concerned about


if an error is displayed ( error_reporting () > 0 ) and an error occurs ( $errno > 0 ), throw an exception
otherwise only record the error

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f2e4-42dc4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f2e4-42dc4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?