How To Catch All Errors & Exceptions In PHP
Welcome to a quick tutorial on how to catch all errors and exceptions in PHP. Need to cast a net and capture all the errors to figure out what went wrong? We can capture all errors in PHP using the set_exception_handler() function. For example: function elog ($ex) { error_log($ex->getMessage()); } set_exception_handler($elog); That covers the quick …