Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between dpm() and dsm()?

Tags:

drupal

What are the differences between dpm() and dsm()?

like image 338
markdorison Avatar asked Oct 28 '10 20:10

markdorison


2 Answers

dpm() prints a variable to the ‘message’ area of the page using drupal_set_message(). The output and compact and less likely to break the layout of your page.

From the devel docs:

A note from the devel module: dsm() is a legacy function that was poorly named; use dpm() instead, since the 'p' maps to 'print_r'.

I think we should trust the devel folks on that one.

like image 141
friendlydrupal Avatar answered Sep 22 '22 02:09

friendlydrupal


dsm() is legacy function. It's a call to dpm() as it is, so you should use dpm().

like image 25
Nikit Avatar answered Sep 24 '22 02:09

Nikit