Friday, September 3, 2010

cfdump in php!

April 24, 2007 by Josh Highland  
Filed under coldfusion, internet, php, software, tutorials, web 2.0

At work, I write ColdFusion, at home I write PHP. I bounce back and forth between worlds. Jack of all trades, master of none I guess.

One thing that I have always loved about ColdFusion is the cfdump tag. You feed it any variable, and it will spit out whats in it. Struct, String, Array, Query, Object, XML, it doesnt matter, it just works. I would go as far to say that its one of the best native debugging resources I have ever seen in a web development language.

In PHP, you can do a print_r() and look at the source, but that is no where as cool as cfdump. I have longed for a cfdump style resource to be available in PHP. Today I got my wish when I stumbled upon “dBug”. http://dbug.ospinto.com

dBug is a small PHP class that duplicates the cfdump tag from ColdFusion

look how simple it is to use:

include_once("dBug.php");
new dBug($myVariable);

The output looks like this:
phpdump.gif

dBug will handle anything you throw at it, just like cfdump does. This is going to help me so much in the future. If you develop in PHP, I think that this class is a must have in your tool kit.

dBug is free! get it today from http://dbug.ospinto.com

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • MySpace
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks

Comments

5 Responses to “cfdump in php!”
  1. this is great! i LOVE cfdump and missed it so much. now we are RE-UNITED!

  2. Paul Feakins says:

    Ah yes this is brilliant! There’s also one for Javascript: http://www.netgrow.com.au/files/javascript_dump.cfm

    Thanks for posting!
    Paul.
    http://www.antropyconsulting.com

  3. Unibands says:

    Hi, this looks great.

    I’m a ColdFusion user, and it’s nice to see such an established language such as PHP borrowing ideas from us. CFDUMP is one of the most valuable things in ColdFusion for debugging.

    Hopefully this will hint to PHP users just one of the many things that ColdFusion and CFML have to offer to developers.

    ColdFusion is not owned by Adobe, they have an engine, but there are a few others.

    Open Source / Free Coldfusion Engines

    http://www.openbluedragon.org/about.cfm
    http://www.getrailo.org/

    ColdFusion has a bad rep, usually down to many misconceptions. The language and the engines and community however are very much alive.

    It’s better than ever now to be a CF developer.

    Enough of my preaching!!

    Thanks,
    Mikey.

  4. Paul Alkema says:

    “master of none I guess”.

    Humble too, haha. ;)

Trackbacks

Check out what others are saying about this post...
  1. [...] read more | digg story [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!