News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brandon Savage's Blog:
Bug-Free Using Function Traces To Better Understand Code (Part 3 of N)
October 21, 2008 @ 12:05:41

Brandon Savage has posted the third part of his "Bug-Free" series to his blog today. This part focuses on the use of function traces to help narrow down the issue.

Have you ever been handed some code and told, "make it work"? If you haven't, chances are good you will some day. It's often a daunting task, especially since, as one programmer told me, "comments come when the second developer has to make changes." While this is likely bad coding practice, it's happened to me more than once.

Lucky for us, XDebug has a built-in tool that helps us evaluate code and figure out some of what is going on without spending all week reading the documentation or the code itself. It's called "function profiling."

He show how to use this profiling in your code, getting the trace results from a loop that outputs the ord() of a character (in the string "Xdebug"). He also talks about configuration changes you can make to include the parameters of the function call, the memory usage and the returns for each of the functions.

0 comments voice your opinion now!
function trace xdebug phpini profile configure


blog comments powered by Disqus

Similar Posts

Community Crosstalk: Matthew O'Phinney & Scott Johnson on Dynamic Function/Method Calls

Ilia Alshanetsky's Blog: Filter Extension Revamped (and PHP 5.2 news)

Christoph Dorn's Blog: Profiling queries with Zend_Db_Profiler_Firebug

Stefan Reuter's Blog: Profiling PHP Applications

PHP Live!: Installing PHP on a Windows Server with IIS5


Community Events





Don't see your event here?
Let us know!


threedevsandamaybe series configure code bugfix release list community project framework interview wordpress language api laravel introduction application podcast library developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework