News Feed
Sections




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

Tony Freixas's Blog:
High-performance debugging
September 26, 2007 @ 12:59:00

Tony Freixas has posted a new article covering his thoughts on high-performance debugging with PHP5:

In this article, I will show you how to use PHP 5 input filters to support debug, trace and assert statements so that a one-line change disables these statements and restores your script to full production performance.

He makes a custom solution, a simple method for just outputting simple debug statements via his own custom debugging classes - thDebug, theTrace and thAssert. He wraps all of these in a thDebugManager class to make them all play nice together.

With these in place, he moves on to the real key to the debugger, using the input filter extension that comes with PHP5. He makes a thAbstractStreamFilter abstract class to base the filtering on and, using this interface, makes his thDebugFilter class to handle the various debugging outputs. He uses the __autoload functionality to load it correctly into each page that needs it.

0 comments voice your opinion now!
debugging performance filter php5 trace assert debug debugging performance filter php5 trace assert debug


blog comments powered by Disqus

Similar Posts

Dallas PHP Users Group: PHP4 to PHP5 Minor gotcha

Simon Holywell: HHVM vs Zephir vs PHP: The showdown

Jared White's Blog: Developer Preview 2 of Willowgarden has been released today

Dutch Web Alliance: The definitive remote debug and unittest with PHPStorm guide: part 3

PHP.net: PHP 4 end of life announcement


Community Events

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


framework version community series extension list voicesoftheelephpant security library release language laravel php7 laravel5 example podcast interview opinion introduction api

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