这个很早就有了,比php自带的var_dump好用多了。
function dump($vars, $label = \'\', $return = false) {
if (ini_get(\'html_errors\')) {
$content = \"<pre>\\n\";
if ($label != \'\') {
$content .= \"<strong>{$label} :</strong>\\n\";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= \"\\n</pre>\\n\";
} else {
$content = $label . \" :\\n\" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
本文地址:https://www.stayed.cn/item/7424
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我