时间:2021-07-01 10:21:17 帮助过:15人阅读
function dump($vars, $label = '', $return = false) {
if (ini_get('html_errors')) {
$content = "\n";\n";
if ($label != '') {
$content .= "{$label} :\n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "\n
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}