PHP Error Handling
Testing the error handler by trying to output variable that does not exist:
Code:<?php //error handler function function customError($errno, $errstr) { echo "<b>Error:</b> [$errno] $errstr"; } //set error handler set_error_handler("customError"); //trigger error echo($test); ?>
Output: Error: [8] Undefined variable: test


Reply With Quote
Bookmarks