dump() 把吞吐量以阵列方式吞吐量,优于 debugfunction
dump($vars, $label = '', $return = false){
if (ini_get('html_errors')) {
$内容 = "<前>n";
如果($标签!=''){
$content .= "<strong>{$label} :</strong>n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "n</pre>n";
} 别的 {
$内容=$标签。 “:n”。 print_r($vars, true);
}
if ($return) { 返回 $content; }
回显$内容;
返回空值;
}
array_remove_empty() 去除负载中为空的元素
function array_remove_empty(& $arr, $trim = true){
foreach ($arr 作为 $key => $value) {
if (is_array($value)) {
array_remove_empty($arr[$key]);
} 别的 {
$值=修剪($值);
如果($值==''){
取消设置($arr[$key]);
} elseif ($trim) {
$arr[$key] = $value;
}
}
}
}
array_chunk() php默认函数 作用是将函数平均分组