0) { foreach ($tmp as $k => $v) { if ($k == 'zh' || $k == 'key') { continue; } if ($count != substr_count($v, '(*)')) { $regrror[$key] = $tmp; continue 2; } } } } else { $redundants[$key] = $tmp; } } foreach ($array as $text) { $key = trim($text); if (!isset($translations[$key])) { $needs[$key] = $key; } } if (count($regrror) > 0) { print_r("regrror:\n"); print_r(implode("\n", array_keys($regrror))); print_r("\n\n"); } if (count($redundants) > 0) { print_r("redundants:\n"); print_r(implode("\n", array_keys($redundants))); print_r("\n\n"); } if (count($needs) > 0) { print_r("needs:\n"); print_r(implode("\n", array_keys($needs))); print_r("\n\n"); } print_r([ 'translate_count' => count($translations), 'regerror_count' => count($regrror), 'redundant_count' => count($redundants), 'need_count' => count($needs), ]);