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

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -

javascript - parsing json not working -