Home » Php » trace – How to print all function calls when running php code

trace – How to print all function calls when running php code

Posted by: admin February 25, 2020 Leave a comment

Questions:

Similar to bash -X (at least print all function calls), how to do similar thing in PHP 7.2? (i need to trace which function being called on command line)

How to&Answers:

You can use native function for your need : debug_print_backtrace https://www.php.net/manual/fr/function.debug-print-backtrace.php.