Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread John
Hi Morgan, You tip is fantastic. Will post it (with your permission) at my weblog, http://php.weblogs.com/ tomorrow. Regards, John "Morgan Curley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I generally include the following function: > function

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Plutarck
I use print_r on arrays, and var_dump on everything else. print_r will not tell you if a variable is NULL, but var_dump will. So I usually use both. -- Plutarck Should be working on something... ...but forgot what it was. ""John Lim"" <[EMAIL PROTECTED]> wrote in message 9asuq0$f1n$[EMAIL PRO

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Morgan Curley
I generally include the following function: function dump( $label, $input ){ echo( "" ); echo( "$label\n" ); print_r( $input ); echo( "" ); return 1; } or if you like javascript this pops up an

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Philip Olson
Here's some info about the two functions. Descriptions (from manual) : print_r -- Prints human-readable information about a variable (PHP 4) var_dump -- Dumps information about a variable (PHP 3 >= 3.0.5, PHP 4) An example

[PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread John Lim
Just a question that has been besetting me for a while: which is better for debugging -- vardump( ) or print( ) ? Does anyone have a preference? Why? Is one better than the other? Thanks for answering this prickly question! John Lim -- PHP General Mailing List (http://www.php.net/) To unsub