error_get_last
(PHP 5 >= 5.2.0)
error_get_last — 获取最后发生的错误
说明
array error_get_last
( void
)
获取关于最后一个发生的错误的信息。
返回值
   返回了一个关联数组,描述了最后错误的信息,以该错误的 "type"、
   "message"、"file" 和 "line" 为数组的键。
   如果该错误由 PHP 内置函数导致的,"message"会以该函数名开头。
   如果还没有错误则返回 NULL。
  
范例
Example #1 An error_get_last() 范例
<?php
echo $a;
print_r(error_get_last());
?>
以上例程的输出类似于:
Array
(
    [type] => 8
    [message] => Undefined variable: a
    [file] => C:WWWindex.php
    [line] => 2
)
  
  参见
    Error constants
    Variable $php_errormsg
    Directive display_errors
    Directive html_errors
    Directive xmlrpc_errors