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

python - rpy2 import is not working -

javascript - How to get MySQL query result returned using $.ajax -

javascript - How to use the code plugin with popcornjs -