function testLine($test, $line, &$total, &$success, &$failed, $columns, $exceptions, $verbose) { $stripped = $line; UtfNormal::quickisNFCVerify($stripped); $same = $line == $stripped; $len = mb_strlen(substr($stripped, 0, strpos($stripped, '|'))); if ($len == 0) { $len = strlen(substr($stripped, 0, strpos($stripped, '|'))); } $ok = $same ^ $test >= 3; $ok ^= in_array($test, $exceptions); $ok &= $columns == $len; $total++; if ($ok) { $success++; } else { $failed++; } if ($verbose || !$ok) { print str_replace("\n", "{$len}\n", $stripped); } }