How do I obtain all the functions that zendframework2 executes an action? As shown in the title, how to obtain all the functions that zendframework2 goes through and the time spent on each function when executing an action. If you have ideas and ideas, let's talk about them.
Reply to discussion (solution)
The call tree can be obtained by The debug_backtrace function.
Install debugging tools for further information
How to use the debug_backtrace function to display only the function
You can filter it by yourself.
You can also check whether debug_print_backtrace meets your requirements.
I used debug_backtrace in DEBUG_BACKTRACE_IGNORE_ARGS to filter out the args. I just don't know what software is used to calculate the time.
Install the debugging tool xdebug
Enable file tracking
Xdebug. profiler_enable = on
Specify the report file directory
Xdebug. profiler_output_dir =/AMP/xdebug
Run the program and use profiler to view the report file.
The profiler viewing tool for php is available for your next use.
You can also write code analysis by yourself. You can understand the meaning of each section in the report.
The running time must be measured. Although you can add code statistics in the program, because the additional code also takes time, the error must be very large.