Let us debug PHP code faster

    
< ?php
/*testing added temporary for debug only below code starts*/
set_time_limit(0);
register_shutdown_function('ShutDown');
function catchError($errno, $errstr, $errfile = '', $errline = ''){  

   $strerror .="Eroor Type : " .$errno. "<br>";
   $strerror .= "Eroor Message : " . $errstr . "<br>";
   $strerror .= "Eroor File : " . $errfile . "<br>";
   $strerror .= "Line Number : " . $errline;
   
	$subject="error reporting upgrde plan";
	echo $body2="Error:\\n".$strerror;
	$fromName='page level error vcare support';
	$toName='Support Team';
	$attachmentPath='';
	$fromEmail='';
	//$mailto:toemail='vibhore.gaurav@gmail.com';
	//sendEmailMessage_unhotline($toEmail,$subject,$body2,$attachmentPath,$fromEmail,$fromName,$toName);

   //exit();
} 
function ShutDown(){

    $lasterror = error_get_last();
	#print_r($lasterror);
	if(in_array($lasterror['type'],Array( E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR, E_CORE_WARNING, E_COMPILE_WARNING, E_PARSE))){
        catchError($lasterror['type'],$lasterror['message'],$lasterror['file'],$lasterror['line']); 
    }
}
/*testing added temporary for debug only above code ends*/
/* ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL); */

Thanks.