homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

PHP Execution Log
View or capture PHP code executed?
JAB Creations

 5:59 pm on Mar 5, 2011 (gmt 0)

I'm curious if there is a way to somehow capture the PHP code executed when loading a page locally on my system? If so I'd like to be able to compare it to different builds for performance comparisons.

Perhaps a log output similar to this...

echo 'Hi Mom!';
echo 'second line';
echo 'third line executed here';
echo 'etc';

- John


JAB Creations

 9:08 pm on Mar 5, 2011 (gmt 0)

Well I did a bit of digging and came across Xdebug Profiler. In conjunction with WinCacheGrind I was able to find a single line of code that was adding 40 milliseconds of wait to page loads and fixed it. :)

- John


 10:03 pm on Mar 5, 2011 (gmt 0)

Sounds like you are asking for a PHP tracing tool. There is not a built-in trace in PHP, but several extensions exist to accomplish this.

A search for "php tracing" will turn up extensions you could use, including Zend's xdebug and DTrace.

Here's a good intro showing what DTrace can do:

[wikis.sun.com ]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved