debug_backtrace() fails while in output buffering callback

86 views Asked by At

Recently, an application echoed certain stuff at a random point of execution. Finding the exact statement turned out to be a problem: Too many statements emitted stuff.

Thefore, I registered a callback via ob_start() to let the callback echo a debug_backtrace() and exit the application.

Note, that I tried to disable output-buffering as the first statement of the callback.

Unfortunately, debug_backtrace() never returned anything. The app crashed as it called debug_backtrace() in the callback.

I even didn't manage to save the contents of debug_backtrace() to a file (as opposed to stdout).

Could someone explain why?

0

There are 0 answers