Code has been added to clipboard!

Testing PHP Error Handler

Example
<?php
  //error handler function
  function custom_error($err_no, $err_str) {
    echo "<b>Error caught!</b> [$err_no] $err_str";
  }

  //set error handler
  set_error_handler("custom_error");

  //trigger error
  echo($test);
?>