PHP - Function debug_print_backtrace()


Advertisements


Syntax

void debug_print_backtrace ( void );

Definition and Usage

This function prints a PHP backtrace. It prints the function calls, included/required files and eval()ed stuff.

Parameters

Parameter Description
void NA.

Return Value

No value is returned.

Example

Following is the usage of this function −

<?php
   function one() {
      two();
   }
   
   function two() {
      three();
   }
   
   function three(){
      debug_print_backtrace();
   }
   one();
?> 

This will produce the following result −

#0  three() called at [/var/www/tutorialspoint/php/test.php:7]
#1  two() called at [/var/www/tutorialspoint/php/test.php:3]
#2  one() called at [/var/www/tutorialspoint/php/test.php:13]

php_function_reference.htm

Advertisements