News Feed
Sections




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

Richard Davey's Blog:
dBug - var_dump with style!
February 10, 2006 @ 06:56:14

Richard Davey has posted this new item today to share a helpful tool for debugging your PHP scripts without having to purchase an expensive debugger package - dBug.

When it comes to debugging PHP applications most developers fall into one of two camps. They either use a package such as Zend Debugger, set breakpoints and painstakingly go through their code checking the variable values. Or alternatively for those of you not using $200 worth of IDE, and a common method employed by more php 'beginners', they will print_r() and var_dump() all over the place to check what is going on, the resulting dumps appearing inline with the rest of the site.

Personally, I use both methods, and I imagine most other developers are in the same boat. When you need a quick variable output or to see the full contents of an array you often can't beat var_dump for speed of implementation. Which is why this superb little class file that was recently bought to my attention (thanks Chris!) should be of interest to you all.

He gives some visual examples of how the output from this powerful little script works, including the simple three-line code to make it happen. The library really shines when it comes time it echo out more complex data, creating easy to read tables of information versus the normal difficult to read var_dump/print_r output.

You can find dBug at http://dbug.ospinto.com/.

0 comments voice your opinion now!
var_dump style dBug library table ouput print_r var_dump style dBug library table ouput print_r


blog comments powered by Disqus

Similar Posts

JBLabs Blog: How to create a zip archive using PHP

PHP in Action: Type hints are more useful for scalars than objects

Tim Koschuetzki's Blog: Parsing XML With The DOM Library

Tim Koschuetzki's Blog: Parsing XML With The DOM Library

Wolfgang Drews' Blog: Using YUI autocomplete with Zend Framework


Community Events





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


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

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