How to use error get last in PHP

This article describe about error_get_last() function in PHP.
  • 2521

error_get_last() function

This function get the last error that occur.

Last error return in the array or null if not occur.

Return array contain key and value that describe below.

  • [type] - Error type
  • [message] - Error message
  • [file] - The file where the error occurred
  • [line] - The line where the error occurred

Syntax

error_get_last()

 

Example

 

<html>
<body>
<?php
echo $test;
print_r(error_get_last());
?>
</body>
</html>

Output

pic17.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.