- restore_error_handler: documentation ( source)
- set_error_handler: documentation ( source)
- trigger_error: documentation ( source)
<?php
function t35_handler_MOO($no, $msg){
echo __LINE__.__METHOD__."\n";
restore_error_handler();
echo __LINE__.__METHOD__."\n";
}
function t35_handler($no, $msg){
echo __LINE__.__METHOD__."\n";
restore_error_handler();
echo __LINE__.__METHOD__."\n";
}
function t35(){
set_error_handler("t35_handler_MOO");
echo "old handler=".set_error_handler("t35_handler")."\n";
trigger_error("error1");
//echo "old handler=".set_error_handler("t35_handler")."\n";
trigger_error("error2");
}
t35();
?>