Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP error_get_last() Function

PHP error_get_last() Function


PHP Error Reference Manual Complete PHP Error Reference Manual


Definition and Usage

The error_get_last() function gets the last error that occurred.

This function returns the last error that occurred as an array. If no error occurred, it returns NULL.

The returned error array contains 4 keys and values:

Syntax

error_get_last()


Example

The output of the code above is shown below:

Array

(

[type] => 8

[message] => Undefined variable: test

[file] => C:webfoldertest.php

[line] => 2

)


PHP Error Reference Manual Complete PHP Error Reference Manual