How do I catch a PHP fatal (`E_ERROR`) error?

前端 未结 17 2318
北荒
北荒 2020-11-21 06:21

I can use set_error_handler() to catch most PHP errors, but it doesn\'t work for fatal (E_ERROR) errors, such as calling a function that doesn\'t e

17条回答
  •  忘掉有多难
    2020-11-21 06:59

    Not really. Fatal errors are called that, because they are fatal. You can't recover from them.

提交回复
热议问题