static function krumo::dump in Devel 6
Same name and namespace in other branches
- 7 krumo/class.krumo.php \krumo::dump()
* Dump information about a variable * *
Parameters
mixed $data,...: * @access public * @static
19 calls to krumo::dump()
- krumo::backtrace in krumo/
class.krumo.php - * Prints a debug backtrace * * @access public * @static
- krumo::classes in krumo/
class.krumo.php - * Prints a list of all currently declared classes. * * @access public * @static
- krumo::conf in krumo/
class.krumo.php - * Prints a list of all your configuration settings. * * @access public * @static
- krumo::cookie in krumo/
class.krumo.php - * Prints a list of all the values from the <i>$_COOKIE</i> array. * * @access public * @static
- krumo::defines in krumo/
class.krumo.php - * Prints a list of all currently declared constants. * * @access public * @static
File
- krumo/
class.krumo.php, line 543
Class
- krumo
- Krumo API
Code
static function dump($data) {
// disabled ?
//
if (!krumo::_debug()) {
return false;
}
// more arguments ?
//
if (func_num_args() > 1) {
$_ = func_get_args();
foreach ($_ as $d) {
krumo::dump($d);
}
return;
}
// the css ?
//
krumo::_css();
// find caller
// DEVEL: we added array_reverse() so the proper file+line number is found.
$_ = array_reverse(debug_backtrace());
while ($d = array_pop($_)) {
// DEVEL: changed if() condition below
if (strpos(@$d['file'], 'devel') === FALSE && strpos(@$d['file'], 'krumo') === FALSE && @$d['class'] != 'krumo') {
break;
}
}
// the content
//
?>
<div class="krumo-root" dir="ltr">
<ul class="krumo-node krumo-first">
<?php
echo krumo::_dump($data);
?>
<li class="krumo-footnote">
<div class="krumo-version" style="white-space:nowrap;">
<h6>Krumo version <?php
echo krumo::version();
?></h6> | <a
href="http://krumo.sourceforge.net"
target="_blank">http://krumo.sourceforge.net</a>
</div>
<?php
if (@$d['file']) {
?>
<span class="krumo-call" style="white-space:nowrap;">
Called from <code><?php
echo $d['file'];
?></code>,
line <code><?php
echo $d['line'];
?></code></span>
<?php
}
?>
</li>
</ul>
</div>
<?php
// flee the hive
//
$_recursion_marker = krumo::_marker();
if ($hive =& krumo::_hive($dummy)) {
foreach ($hive as $i => $bee) {
if (is_object($bee)) {
unset($hive[$i]->{$_recursion_marker});
// DEVEL: changed 'else' to 'elseif' below
}
elseif (is_array($bee)) {
unset($hive[$i][$_recursion_marker]);
}
}
}
// PHP 4.x.x array reference bug...
//
if (is_array($data) && version_compare(PHP_VERSION, "5", "<")) {
unset($GLOBALS[krumo::_marker()]);
}
}