Name

error_get_last

Synopsis

array error_get_last()

Returns an associative array of information about the most recent error that occurred, or NULL if no errors have yet occurred while processing the current script. The following values are included in the array:

type

The type of error

message

Printable version of the error

file

The full path to the file where the error occurred

line

The line number within the file where the error occurred

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.