error_reporting
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sets which PHP errors are reported
error_reporting
(?
int $error_level
=
null
):
int
static::
$app
=
$app
;
error_reporting
(-
1
);
set_error_handler
(
$this
->
forwardsTo
(
'handleError'
));
src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
return
$this
->
handleDeprecationError
(
$message
,
$file
,
$line
,
$level
);
}
if (
error_reporting
() &
$level
) {
throw new
ErrorException
(
$message
,
0
,
$level
,
$file
,
$line
);
}
}
src/Illuminate/Foundation/Bootstrap/HandleExceptions.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
);
}
});
src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php