Drupal Object Log
Submitted by wilbur on
Drupal Modules:
Over the past few months I have been writing array object to watchdog as messages. This is pretty handly for seeing LOTS of variable arrays in some sort of order. Here's a snippet from Dropbucket where I got the idea:
watchdog("my_module", '<pre>' . print_r( $my_array_or_object, true) . '</pre>');
This approach might be OK on your local dev environment, but you do NOT want to do this on your live site! All those messages become translatable strings, and get piled up in the translation table. That becomes a big mess quick.