PHP debug_print_backtrace()

debug_print_backtrace() writes the current call stack to the output. Use debug_backtrace() when you need an array of frames instead.

A simple example

debug_print_backtrace()

  1. Start with Function start calls show
  2. Do this Print a trace from inside show
  3. Result Trace includes show and its caller
The printed frames let you follow the calls back toward the entry point.