这个很早就有了,比php自带的var_dump好用多了。
复制代码 代码如下:
function dump($vars, $label = '', $return = false) {
if (ini_get('html_errors')) {
$content = "
\n"; <br>if ($label != '') { <br>$content .= "<strong>{$label} :</strong>\n"; <br>} <br>$content .= htmlspecialchars(print_r($vars, true)); <br>$content .= "\n
登录后复制
\n";
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
http://www.bkjia.com/PHPjc/728103.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/728103.htmlTechArticle这个很早就有了,比php自带的var_dump好用多了。 复制代码 代码如下: function dump($vars, $label = '', $return = false) { if (ini_get('html_errors')) { $content...