Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,940 questions

51,877 answers

573 users

How to use debug_print_backtrace() to prints a backtrace in PHP

1 Answer

0 votes
// test.php

function fa() {
    fb();
}

function fb() {
    fc();
}

function fc(){
    echo "<pre>";
    debug_print_backtrace();
    echo "</pre>";
}

fa();

// test-file.php

include_once 'test.php';
   
   
/*
run:

#0  fc() called at [C:\xampp\htdocs\knowrex.com\test.php:15]
#1  fb() called at [C:\xampp\htdocs\knowrex.com\test.php:11]
#2  fa() called at [C:\xampp\htdocs\knowrex.com\test.php:24]
#3  include_once(C:\xampp\htdocs\knowrex.com\test.php) called at 
    [C:\xampp\htdocs\knowrex.com\test-file.php:8]

*/

 



answered Jun 14, 2016 by avibootz
...