Home > Backend Development > PHP Tutorial > symfony - 有没有打印php程序执行过程的代码?

symfony - 有没有打印php程序执行过程的代码?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:36:09
Original
941 people have browsed it

我在学习php的symfony框架,在制作表单的时候,发现form表单不太灵活,官方的文档很多都是包装好的函数,不太清楚内部原理。我在查看源码的时候,发现都是些对象,绕来绕去不知道有多少对象,头都晕了,也不知道是怎么回事。不知道有没有方法将代码从请求到到结束的过程中所有执行过的代码都打印出来,好方便分析源代码

回复内容:

我在学习php的symfony框架,在制作表单的时候,发现form表单不太灵活,官方的文档很多都是包装好的函数,不太清楚内部原理。我在查看源码的时候,发现都是些对象,绕来绕去不知道有多少对象,头都晕了,也不知道是怎么回事。不知道有没有方法将代码从请求到到结束的过程中所有执行过的代码都打印出来,好方便分析源代码

在你需要了解的地方执行如下函数
debug_print_backtrace()
更详细的信息请看PHP官方手册

当然建议使用Xdebug来跟踪执行过程,或者直接xdebug trace出完整的执行过程

xhprof也不错

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template