5

Currently I'm reading php's manual about callback functions and found interesting note:

Callbacks registered with functions such as call_user_func() and call_user_func_array() will not be called if there is an uncaught exception thrown in a previous callback.

It's obvious that script run will be interrupted in case of uncaught exception. So, why did authors of php manual additionally write that about call_user_func? Or I misunderstood the statement?

4

1 回答 1

1

在我看来,这比文档的一部分更像是一个提醒。所有未捕获的异常在 php 中都是致命的,除非他们在谈论 call_user_func() 无聊,即使您设置了处理程序(使用 set_exception_handler)而不是 catch,这听起来像是律师会做的事情。

于 2012-10-21T17:32:54.903 回答