捕获错误,第二种:注册异常处理函数
<?php
set_exception_handler('xiaoming');
non_exists_func();
function xiaoming($param)
{
echo "\n I catch an error\n";
var_dump($param);
}
<?php
set_exception_handler('xiaoming');
non_exists_func();
function xiaoming($param)
{
echo "\n I catch an error\n";
var_dump($param);
}
2017-12-17