I have a page named error.php and want to show all php errors in a table, each error in a row. exactly what display in the error.log file in root.
I used this:
error_reporting(E_ALL & ~E_NOTICE);
And it let show all error in browser when open a page, but what I want is display all errors that happen on website on a single page in list format.
I couldn't find a method to echo all errors in page, and decided to get all errors from error.log file with:
file_get_contents('error.log');
But It hard to modify data to display correctly, is there a right way to do this?
register_shutdown_function(function() { var_dump(error_get_last()); });configure the anonymous function to suit your needs.error_get_last()great, but just a question, why underregister_shutdown_function?