Print PHP Call Stack

前端 未结 15 1645
清歌不尽
清歌不尽 2020-11-27 09:08

I\'m looking for a way to print the call stack in PHP.

Bonus points if the function flushes the IO buffer.

15条回答
  •  眼角桃花
    2020-11-27 09:37

    Strange that noone posted this way:

    debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
    

    This actually prints backtrace without the garbage - just what method was called and where.

提交回复
热议问题