Home > PHP > Function > Error Handling > error_get_last()

error_get_last()

error_get_last - Get the last occurred error

Syntax

array error_get_last ()

Arguments

-

Description

Gets information about the last error that occurred.

Version

PHP 5.2.0

Return value

Returns an associative array describing the last error with keys "type", "message", "file" and "line". Returns NULL if there hasn't been an error yet.