note 111003 deleted from errorfunc.constants by danbrown

From: Date: Thu, 17 Jan 2013 15:24:21 +0000
Subject: note 111003 deleted from errorfunc.constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193144@lists.php.net to get a copy of this message
Note Submitter: php dot net at weeb dot biz ---- 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

« previous php.notes (#193144) next »