Copyright © tutorialspoint.com
array error_get_last ( void ); |
Thsi function gets information about the last error that occured.
| Parameter | Description |
|---|---|
| void | NA. |
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.
Following is the usage of this function:
<?php echo $a; print_r(error_get_last()); ?> |
This will produce following result:
Array
(
[type] => 8
[message] => Undefined variable: a
[file] => /var/www/tutorialspoint/php/test.php
[line] => 2
)
|
Copyright © tutorialspoint.com