Retrieve the most recent error that occurred.
<?php echo $test; print_r(error_get_last()); ?> |
The error_get_last() function returns the most recent error that occurred as an associative array. This array includes the following keys:
error_get_last(); |
Return Value: |
Returns an associative array containing the details of the last error, with keys: type, message, file, and line. Returns null if no error has occurred. |
PHP Version: |
5.2+ |