I'm working on a php prog where the original author used an include_once to import an external file that contains approx 30 separate functions.
Trying to debug one of them I was curious as to when a particular function executed so I put a debut statement near the top of each function printing an entry to the error log that the particular function has been called and executed.
What I found was surprising. It looks like each function is called, in turn. at the start of the program execution. However the logging shows that the functions are called each time a logic cycle is executed and some functions are called multiple time in succession. And no, the logic is NOT in a loop. If fact, some of the functions that are showing being executed are NOT called from the program at all.
So I'm wondering, why would the debug log so so many calls to so many functions if they're not being called from within the program.
Just wondering.
Trying to debug one of them I was curious as to when a particular function executed so I put a debut statement near the top of each function printing an entry to the error log that the particular function has been called and executed.
What I found was surprising. It looks like each function is called, in turn. at the start of the program execution. However the logging shows that the functions are called each time a logic cycle is executed and some functions are called multiple time in succession. And no, the logic is NOT in a loop. If fact, some of the functions that are showing being executed are NOT called from the program at all.
So I'm wondering, why would the debug log so so many calls to so many functions if they're not being called from within the program.
Just wondering.