English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP debug_print_backtrace() Function Usage and Example

PHP Error & Loggings Reference Manual

The debug_print_backtrace() function prints a backtrace.

Syntax

void debug_print_backtrace ( void );

Definition and Usage

 debug_print_backtrace() prints a PHP backtrace. It prints function calls, included/Required files and eval() code.

Parameter

NumberParameters and Description
1

void

No parameters required

Return value

No return value.

Online Example

The following is the usage of the debug_print_backtrace function-

<?php
   function one() {
      two();
   }
   
   function two() {
      three();
   }
   
   function three(){
      debug_print_backtrace();
   }
   one();
?>
Test to see‹/›

This will produce the following result-

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