php - pass a class to set_error_handler -


Is there a way to set an error handler that takes a callback function as a static function? Like:

  set_error_handler (Errors :: Error Handler ());  

I'm not using PHP O, so I do not want to create a function after my procedural code. I would rather prefer that the error be sent to the class function.

For a steady way:

set_error_handler (array ('callback ',' Static method '));

For non-static methods:

  $ obj = new callback (); Set_error_handler (array ($ obj, 'method'));  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -