PHP print stack trace

To output a debug stack trace while executing a PHP script, use the following code:

debug_print_backtrace();