debug_backtrace() from registered shutdown function in PHP

前端 未结 5 509
长发绾君心
长发绾君心 2020-12-15 05:02

While tinkering for an answer to this question, I found that debug_backtrace() doesn\'t trace beyond the function registered to register_shutdown_function

5条回答
  •  被撕碎了的回忆
    2020-12-15 05:33

    From my experience, the shutdown function starts with a clean stack, and it has no access to the "original" stack (as it no longer exists at that point).

    Unfortunately, there is no way to save that original stack.

提交回复
热议问题