How to detect where a function call came from..

It is for static page, dynamic page, website, SEO, performance and other web development discussion
ramverma
Posts: 435
Joined: Sat Aug 23, 2014 5:34 pm
Contact:

How to detect where a function call came from..

Postby ramverma » Thu Oct 29, 2015 9:27 am

Is there an easy way to stop the program and indicate where the subroutine was called from..
<?php
function writeMsg() {
echo "Hello world!";
}

writeMsg(); // call the function
?>
Bottom line if I halt the program at the function.. how can I display what the call was that called the program..
I realize I could search for writeMsg() but it will be called from many different points in the program at different times..
I would like to have it log each call and where it came from...

thanks.


Return to “PHP, HTML, MYSQL and Web Hosting”

Who is online

Users browsing this forum: No registered users and 2 guests