PHP - Converting all Errors to Exceptions - Good or Bad?
问题 I was wondering if it's considered a bad practice to globally convert all PHP Errors to Exceptions. Something like the following would be used: function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); return false; } I suppose the assumption is that you can just start using "try/catch" around certain pieces of code that would normally throw Errors. If it's not a case of Good/Bad, what are some of the Gotchas