Replace print_r and var_dump with Krumo

Krumo

Here’s a good replacement for your standard print_r and var_dump in PHP, Krumo beautifies and expands the functionality required for PHP debugging:

To put it simply, Krumo is a replacement for print_r() and var_dump(). By definition Krumo is a debugging tool (now for PHP5 only), which displays structured information about any PHP variable.

A lot of developers use print_r() and var_dump() in the means of debugging tools. Although they were intended to present human readable information about a variable, we can all agree that in general they are not. Krumo is an alternative: it does the same job, but it presents the information beautified using CSS and DHTML.

Apart from dumping variable data, the current version of Krumo also supports the following :

  • Print Backtrace
  • List all included files
  • List all functions
  • List all declared classes
  • List all constants

Project Page: Krumo: Version 2.0 of print_r(); and var_dump();
Demo Page: http://kaloyan.info/krumo/demo/index.php

4 Responses to “Replace print_r and var_dump with Krumo”
  1. [...] Thomas has proposed a replacement for the usual var_dump or print_r sort of debugging developers tend to do – Krumo. To put it [...]

  2. Dever 10 April 2008 at 4:20 am #

    Looks a lot better .. i’ll give it a go these days.

  3. debugger 10 April 2008 at 12:51 pm #

    Pretty, it’s like a poor man’s (no root priviledges) http://xdebug.org/docs/display.

  4. [...] [...]

Leave a Reply