예제 #1
0
 /**
  * Turns on error reporting, and returns the handler.
  * 
  * If you just want error reporting on, then don't bother
  * catching the handler. If you're building something
  * clever, like a framework, then you might want to grab
  * and use it.
  * 
  * Note that calling this a second time will replace the
  * global error handling with a new error handler.
  * The existing one will be turned off, and the new one
  * turned on.
  * 
  * You can't use two at once!
  * 
  * @param options Optional, options declaring how PHP Error should be setup and used.
  * @return The ErrorHandler used for reporting errors.
  */
 function reportErrors($options = null)
 {
     $handler = new ErrorHandler($options);
     return $handler->turnOn();
 }