Is there a way to make a “direct trace” in PHP?

I am familiar with a function debug_backtracein PHP and really find it useful. However, I have a specific, very dirty case, when I need to be able to do the opposite - insert a function call somewhere and give me a list of each function called after this point until the page is fully loaded.

We have XDebug installed, and for most projects I use it. This is a really dirty code base, but with a lot of ajax and php code that are actually created as strings and rendered (I have NOT written this code!), And none of us have ever succeeded in working with the debugger.

+4
source share
1 answer

PHP has a ticks function that can be called when each statement is executed.

Using the ticks function, my answer describes a CStatemenTracer class that writes a call trace along with the execution of your application.

May be a starting point.

+1
source

Source: https://habr.com/ru/post/1526833/


All Articles