Hi internals,

Since PHP 8.0, `error_reporting()` started returning a non-zero value when
the @ silence operator is used.

Demo: https://3v4l.org/CovYv

Is this intentional? This breaks scripts that converted all errors to
exceptions, except those where the silence operator was used:

    set_error_handler(function ($severity, $message, $file, $line) {
        if (error_reporting() === 0) {
            return;
        }

        throw new ErrorException($message, 0, $severity, $file, $line);
    });

Thank you,
Benjamin

Reply via email to