error_get_last

It returns the last error occurred

Example

<?php
echo “<pre>”;
echo $test;
print_r(error_get_last());
?>

Output

Array
(
[type] => 8
[message] => Undefined variable: test
[file] => /var/www/test/index.php
[line] => 3
)