PHP debug_backtrace()

debug_backtrace() returns an array of stack frames. Each frame describes one call and may include a function name, file, line, arguments, class, or object.

A simple example

debug_backtrace()

  1. Start with Function start calls show
  2. Do this Inspect the current call stack
  3. Result start appears as a caller
The stack records the chain of calls that led to the current line.