Hope this helps:
function debugErrorHandler($errno, $errstr, $errfile, $errline) { if(error_reporting()!==0) { switch($errno) { default: error_log("PHP Warning Debug: Server Request URI: " . print_r($_SERVER["REQUEST_URI"], true)); break; } return false;
source share