note 111003 added to errorfunc.constants
| From: | php dot net at weeb dot biz | Date: | Fri, 04 Jan 2013 13:08:01 +0000 |
| Subject: | note 111003 added to errorfunc.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192762@lists.php.net to get a copy of this message | ||
A less verbose way of showing all the flags set would be:
<?php
$allFlags = array("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");
$setFlags = array_filter($allFlags, function($v) {return error_reporting() &
constant($v);});
echo implode("<br>", $setFlags);
?>
Unlike the previous version it does not display a blank line where missing flags are, but personally
I think that is an advantage
----
Server IP: 94.76.225.145
Probable Submitter: 94.31.26.5
----
Manual Page -- http://php.net/manual/en/errorfunc.constants.php
Edit -- https://master.php.net/note/edit/111003
Del: integrated -- https://master.php.net/note/delete/111003/integrated
Del: useless -- https://master.php.net/note/delete/111003/useless
Del: bad code -- https://master.php.net/note/delete/111003/bad+code
Del: spam -- https://master.php.net/note/delete/111003/spam
Del: non-english -- https://master.php.net/note/delete/111003/non-english
Del: in docs -- https://master.php.net/note/delete/111003/in+docs
Del: other reasons-- https://master.php.net/note/delete/111003
Reject -- https://master.php.net/note/reject/111003
Search -- https://master.php.net/manage/user-notes.php