Hello @kartik,
This is how you do it:
set_error_handler(function($errorType){
if(error_reporting() & $errorType){
?><pre><?
debug_print_backtrace();
?></pre><?
}
}) ;
It requires PHP 5.3+ since it uses a closure. If you need lower PHP support just convert the closure to a normal function.