<?php
//自定义的错误处理函数
function error_customer($errno,$errstr)
{
    echo "<strong>错误:</strong>[$errno]$errstr<br>";
    echo "终止程序.";
    die();
}

set_error_handler('error_customer');  //设置函数句柄

echo $a;  //错误输出未定义的变量,诱发错误