note 126512 added to function.error-reporting
| From: | gtisza at gmail dot com | Date: | Mon, 18 Oct 2021 04:27:21 +0000 |
| Subject: | note 126512 added to function.error-reporting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217083@lists.php.net to get a copy of this message | ||
error_reporting() returns an integer, which is not so useful when debugging, so here's a handy
snippet to check the reporting level:
<?php
$er = error_reporting(); foreach (['E_ERROR', 'E_WARNING', 'E_PARSE',
'E_NOTICE', 'E_CORE_ERROR', 'E_CORE_WARNING',
'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
'E_USER_WARNING', 'E_USER_NOTICE', 'E_STRICT',
'E_RECOVERABLE_ERROR', 'E_DEPRECATED', 'E_USER_DEPRECATED'] as $level)
if (defined($level) && (constant($level) & $er)) echo "$level ";
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 50.202.116.174)
----
Manual Page -- https://php.net/manual/en/function.error-reporting.php
Edit -- https://main.php.net/note/edit/126512
Del: integrated -- https://main.php.net/note/delete/126512/integrated
Del: useless -- https://main.php.net/note/delete/126512/useless
Del: bad code -- https://main.php.net/note/delete/126512/bad+code
Del: spam -- https://main.php.net/note/delete/126512/spam
Del: non-english -- https://main.php.net/note/delete/126512/non-english
Del: in docs -- https://main.php.net/note/delete/126512/in+docs
Del: other reasons-- https://main.php.net/note/delete/126512
Reject -- https://main.php.net/note/reject/126512
Search -- https://main.php.net/manage/user-notes.php