Learning PHP: What's the equivalent?

Hi all!

I am in the process of picking up a little PHP here and there at my new gig.

I have already made a connection to the database and done my output, yadda yadda yadda. But, what I'm really missing (for debugging purposes of course) is a < cfdump > equivalent in PHP.

How do you do something like, < cfdump var="qryGetEmployees" >, in PHP?

thanks!

Comments
Rory's Gravatar Check out http://joshhighland.com/blog/2007/04/24/cfdump-in-...

To my knowledge, there is nothing native in PHP that does this.
# Posted By Rory | 8/19/09 1:25 PM
phill.nacelli's Gravatar how about:

<cfdump var="PHP" />

<cfset learnedLesson = goBackToColdFusionAndKeepLifeSane() />

... sorry you didn't expect us to not take the shot did you??? ;)
# Posted By phill.nacelli | 8/19/09 1:27 PM
Admin's Gravatar @Rory: Awesomeness! Will have to try that out when I get home tonight.
# Posted By Admin | 8/19/09 1:28 PM
Jason Klingstedt's Gravatar var_dump

It's not nicely formatted like cfdump is, but at least you can see what is going on.

http://us2.php.net/var_dump
# Posted By Jason Klingstedt | 8/19/09 1:29 PM
Admin's Gravatar @Phil: LOL! that's hilarious! Seriously though, I'm a CF veteran and will stay that way :) But, hey, it's always nice to add more to your web development tool belt right? I'm just dipping my feet into the PHP world because that's what they use here at my new gig. I have to admit though, that PHP is nowhere near as easy to read as CF. It's definitely geared towards the C style coders.
# Posted By Admin | 8/19/09 1:30 PM
Rick Root's Gravatar You could also try print_r()
# Posted By Rick Root | 8/19/09 1:49 PM
Larry's Gravatar if you use print_r() , wrap it with <pre> tag for long arrays.
# Posted By Larry | 8/19/09 3:06 PM
Russ S.'s Gravatar Hmmm, maybe just install Railo for free?
# Posted By Russ S. | 8/19/09 5:10 PM
Daniel's Gravatar http://dbug.ospinto.com/

someone did the job, translate cfdump to php

enjoy
# Posted By Daniel | 8/20/09 4:20 AM
Rob Wilkerson's Gravatar I'll second the dBug nomination. I've been using it since having to switch from CF and it's been outstanding. I've introduced a lot of others to the wonders of cfdump using it, too. It's always a hit.

<?php new dBug ( $variable_to_dump ); ?>
# Posted By Rob Wilkerson | 8/20/09 8:41 AM
Admin's Gravatar OMG! dBug is a MIRROR of cfdump! LOVE IT!!!
# Posted By Admin | 8/28/09 12:28 PM

Calendar

NAVIGATION

Recent Entries

Recent Comments

RSS

Search

Subscribe

Tags