How do I obtain all the functions that zendframework2 executes an action? -Php Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.