Shortcuts to var_dump and the like

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
spyderboy's picture

Inspired by Dave's presentation last night, I stumbled upon a blog posting listing a few development shortcut functions:

* dpr – Shortcut for dprint_r.
* dvr – Similar to dpr, but uses var_dump instead of print_r.
* dpm – Similar to dpr but print_r's a variable as a message using drupal_set_message.
* dvm – Similar to dpm but uses var_dump instead of print_r.

The original posting can be found here: http://www.thingy-ma-jig.co.uk/blog/02-10-2007/hugely-useful-hugely-undo...

Comments

dpm() is the most useful

dalin's picture

dpm() is the most useful one. In recent versions of the devel module it uses the krumo library to display the variable in that fancy JS collapsible form.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

DrupalHK

Group categories

HKDUG Vocabulary

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week