Latest web development tutorials

PHP debug_print_backtrace () function

PHP Error Reference Complete PHP Error Reference

Definition and Usage

debug_print_backtrace () function to print backtrace.

This function is displayed by the debug_print_backtrace () function code generation data.

grammar

debug_print_backtrace()


Examples

<?php
function one($str1, $str2)
{
two("Glenn", "Quagmire");
}
function two($str1, $str2)
{
three("Cleveland", "Brown");
}
function three($str1, $str2)
{
debug_print_backtrace();
}

one("Peter", "Griffin");
?>

The output of the code above is as follows:

#0 three(Cleveland, Brown) called at [C:webfoldertest.php:8]
#1 two(Glenn, Quagmire) called at [C:webfoldertest.php:4]
#2 one(Peter, Griffin) called at [C:webfoldertest.php:15]


PHP Error Reference Complete PHP Error Reference