News Feed
Sections




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

SitePoint PHP Blog:
Introducing php-tracer-weaver
December 09, 2008 @ 08:49:00

On the SitePoint PHP blog today Troels Knak-Nielsen has posted about a lesser known feature of the popular XDebug debugging tool - function traces.

In case you haven't heard of it before, it "allows you to log all function calls, including parameters and return values to a file", to quote the manual. After playing around with it for a while, I realised that this information could be parsed and used to determine parameter types and return types of functions.

To illustrate one use for the trace results, he create a simple script that parsed them and reinjected them back into a source file as docblock comments. Included in the post is an example of its usage and the resulting comments for a simple class. It can be downloaded from github.

0 comments voice your opinion now!
xdebug trace function tutorial github application parse docblock comment


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: Fractal: a Practical Walkthrough

Stefan Esser's Blog: Xdebug 2.0.3 - Stealth Patch

TechChorus Blog: Create RESTful Applications Using The Zend Framework - Part II: Using HTTP Response

DevShed: Drawing Basic Rectangles in PDF Documents with PHP 5

PEAR Blog: What would you do with 5 million lines of code?


Community Events

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


api introduction wordpress library conference podcast language opinion middleware development laravel release community voicesoftheelephpant framework extension series laravel5 interview unittest

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