News Feed
Sections




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

Christoph Dorn's Blog:
TIP FirePHP data volume filtering
October 18, 2010 @ 09:57:58

Christoph Dorn has posted a tip for those using the FirePHP tool in their debugging - a way limit the output results (like only part of a huge array of database results).

Array and object values may contain a lot more data as FirePHP traverses them (all array elements and object members) until the complete or maximum depth is reached. This is also true when logging exceptions and traces where all function and method arguments are also traversed. The data volume can quickly grow to megabytes which has fatal consequences for transmission of the debug data to the client and the client being able to render it.

The FirePHPPCore API gives you a way to set this maximum depth level bu setting either a "maxArrayDepth" or "maxObjectDepth" on the FirePHP object before sending it out to the logger. There's also a handy feature that, instead of limiting the depth, can filter out just the elements you're interested in. Code snippets for this and a Zend_Log_Writer_Firebug example are all included.

1 comment voice your opinion now!
firephp debug filter volume array object zendwriter


blog comments powered by Disqus

Similar Posts

ONLamp.com: Points of Attack: PHP and Ajax

Matt Curry's Blog: 8 Ways to Speed Up CakePHP Apps

Padraic Brady's Blog: HTML Sanitisation: The Devil's In The Details (And The Vulnerabilities)

Evert Pot's Blog: PHP: Arrays vs. Objects

Mark Hamlin's Blog: Debugging xdebug (tcp, dns, ubuntu, osx, vmware) ((all at once))


Community Events





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


framework community introduction code unittest opinion series developer testing threedevsandamaybe api release podcast install language laravel refactor symfony2 list interview

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