public static function Debug::dump

Prints a dump of the public, protected and private properties of $var.

@link http://xdebug.org/

Parameters

mixed $var:

integer $maxDepth Maximum nesting level for object properties:

boolean $stripTags Flag that indicate if output should strip HTML tags:

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php, line 49

Class

Debug
Static class containing most used debug methods.

Namespace

Doctrine\Common\Util

Code

public static function dump($var, $maxDepth = 2, $stripTags = true) {
  ini_set('html_errors', 'On');
  if (extension_loaded('xdebug')) {
    ini_set('xdebug.var_display_max_depth', $maxDepth);
  }
  $var = self::export($var, $maxDepth++);
  ob_start();
  var_dump($var);
  $dump = ob_get_contents();
  ob_end_clean();
  echo $stripTags ? strip_tags(html_entity_decode($dump)) : $dump;
  ini_set('html_errors', 'Off');
}