I'm looking for a global configuration setting or a way to globally instruct php5 to print out the names of user-defined functions when any user-defined function executes.
The tricky part is I'd like this to be something I could set in one place, not something that I'd have to manually add to each function.
The goal is to be able to look at a page's output, see an area of concern, enable this mystery mode I'm asking about, refresh the page and instantly see that the area of concern was output by a given php function named "whatever()".
Thanks for any ideas!
(note: I realize this would make a mess of your average php page's output - ie the html would render funny with a bunch of function names suddenly appearing everywhere. That's ok as I would only use this in development/debugging.)
You're looking for Xdebug , the standard debugging tool for PHP. You can set a breakpoint and get a regular stack trace (which is probably what you're looking for) and even a function trace which does, indeed, log all function calls, but it is probably overkill in this scenario.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.