error_reporting

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sets which PHP errors are reported
<?php error_reporting(?int $error_level = null): int
<?php         static::$app = $app;



        error_reporting(-1);



        set_error_handler($this->forwardsTo('handleError'));
<?php     {

        if ($this->isDeprecation($level)) {

            $this->handleDeprecationError($message, $file, $line, $level);

        } elseif (error_reporting() & $level) {

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

        }

    }
<?php     {

        if ($this->originalDeprecationHandler == null) {

            $this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) {

                if (in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]) || (error_reporting() & $level)) {

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

                }

            });