1

Possible Duplicate:
In PHP5, should I use Exceptions or trigger_error/set_error_handler?

In PHP 5+, what is better to use?

  • set_error_handler, because it can also trap errors which are not exceptions;
  • set_exception_handler, because it's a new feature and it maybe came to replace set_error_handler; or
  • both, because one does not supersedes the other, and both are useful?
Community
  • 1
  • 1
Sony Santos
  • 5,435
  • 30
  • 41
  • 1
    Here [is][1] [1]: http://stackoverflow.com/questions/60607/in-php5-should-i-use-exceptions-or-trigger-error-set-error-handler – yAnTar May 04 '12 at 14:34
  • 1
    For better or worse (IMHO worse), exceptions and errors are almost completely unrelated in PHP. You need to handle both, and that will likely be the case forever. – DaveRandom May 04 '12 at 14:40

0 Answers0