function arrayDeep($arr) {
$deep = 0;
if (is_array($arr)) {
++$deep;
$ad = [];
foreach ($arr as $v) {
$ad[] = arrayDeep($v);
}
$ad && $deep += max($ad);
}
return $deep;
}
function arrayDeep($arr) {
$deep = 0;
if (is_array($arr)) {
++$deep;
$ad = [];
foreach ($arr as $v) {
$ad[] = arrayDeep($v);
}
$ad && $deep += max($ad);
}
return $deep;
}