note 29874 modified in function.error-reporting by danbrown

From: Date: Fri, 24 Oct 2008 18:40:34 +0000
Subject: note 29874 modified in function.error-reporting by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145712@lists.php.net to get a copy of this message
tip: if you want your error_reporting()-setting to work with your own error handler you could simply check the error number against the current error bitmask. <?php function myErrorHandler( $errno, $errstr, $errfile, $errline ) { $replevel = error_reporting(); if( ( $errno & $replevel ) != $errno ) { // we shall remain quiet. return; } echo( "error....." ); } ?> --was-- tip: if you want your error_reporting()-setting to work with your own error handler you could simply check the error number against the current error bitmask. function myErrorHandler( $errno, $errstr, $errfile, $errline ) { $replevel = error_reporting(); if( ( $errno & $replevel ) != $errno ) { // we shall remain quiet. return; } echo( "error....." ); } http://php.net/manual/en/function.error-reporting.php

« previous php.notes (#145712) next »