Testing the error handler by trying to output variable that does not exist:
< ?php//error handler functionfunction customError($errno, $errstr) { echo "Error: [$errno] $errstr"; }//set error handlerset_error_handler("customError");//trigger errorecho($test);? >
The output of the code above should be something like this:
Error: [8] Undefined variable: test