/* dump的方法的组装:*/
function dump($vars, $label = null)
{
if (ini_get('html_errors'))
{
$content = "<pre>\n";
if ($label !== null && $label !== '')
{
$content .= "<strong>" . $label . ":</strong>\n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "\n</pre>\n";
}
else
{
$content = "\n";
if ($label !== null && label !== '')
{
$content .= $label . ":\n";
}
$content .= print_r($vars, true) . "\n";
}
echo $content;
return null;
}
function dump($vars, $isExit = FALSE)
{
ob_start();
var_dump($vars);
$vars = ob_get_clean();
$vars = preg_replace("/\\]\\=\\>\\n(\\s+)/m", "] => ", $vars);
echo '<pre>' . $vars . '<pre>';
$isExit && exit();
}