note 64162 added to ref.errorfunc
| From: | NOSPAM at ejdude dot com | Date: | Sun, 09 Apr 2006 05:11:48 +0000 |
| Subject: | note 64162 added to ref.errorfunc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107580@lists.php.net to get a copy of this message | ||
You may use this function in conjunction with your own error handler to determine if the triggered
error should be reported or not:
<?php
// bool is_reported( int errno )
// Returns TRUE if the given error number will be reported
function is_reported( $errno )
{
$level = error_reporting();
// PHP 5 fix -- E_STRICT = 2048
if( $level == 2048 )
{
return true;
}
// Bitwise comparison
return (bool) (( $level & $errno ));
}
?>
Keep in mind that calling a function with @ will temporarily set the error reporting level to zero.
----
Server IP: 216.194.113.175
Probable Submitter: 70.171.76.23
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.errorfunc.php
Edit -- http://master.php.net/note/edit/64162
Del: integrated -- http://master.php.net/note/delete/64162/integrated
Del: useless -- http://master.php.net/note/delete/64162/useless
Del: bad code -- http://master.php.net/note/delete/64162/bad+code
Del: spam -- http://master.php.net/note/delete/64162/spam
Del: non-english -- http://master.php.net/note/delete/64162/non-english
Del: in docs -- http://master.php.net/note/delete/64162/in+docs
Del: other reasons-- http://master.php.net/note/delete/64162
Reject -- http://master.php.net/note/reject/64162
Search -- http://master.php.net/manage/user-notes.php