Get the last error that occured in PHP

Description

The following code shows how to get the last error that occured.

Example


/*from ww w. j  ava 2 s .co m*/
<?php
    echo $test;
    print_r(error_get_last());
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions