<?php
header("Content-Type: text/plain; charset=utf-8");
$text = <<<EOF
русскOе englisH
EOF;
function CheckingEnglishLetter($checkText)
{
$check = '![a-z]!i';
{
}
return $result;
}
'0' => '!o!i',
'1' => '!c!i',
'2' => '!a!i',
'3' => '!e!i',
);
'0' => 'о',
'1' => 'с',
'2' => 'а',
'3' => 'е',
);
echo "Исходный текст:\n{$text}";
$result = CheckingEnglishLetter($text);
echo "\n\nПоиск ошибок:\n{$result}";
echo "\n\nИсправленый текст:\n{$result}";
$result = CheckingEnglishLetter($result);
echo "\n\nДополнительная проверка (выделит ошибки):\n{$result}";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CmhlYWRlcigiQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PXV0Zi04Iik7CgokdGV4dCA9IDw8PEVPRgrRgNGD0YHRgdC6T9C1IGVuZ2xpc0ggCkVPRjsKCmZ1bmN0aW9uIENoZWNraW5nRW5nbGlzaExldHRlcigkY2hlY2tUZXh0KQp7CiAgICAkY2hlY2sgPSAnIVthLXpdIWknOwogICAgewogICAgICAgICRyZXN1bHQgPSBwcmVnX3JlcGxhY2UoJGNoZWNrLCAnWyQwXScsICRjaGVja1RleHQpOwogICAgfQogICAgcmV0dXJuICRyZXN1bHQ7Cn0KCiRwYXR0ZXJucyA9IGFycmF5KAogICAgJzAnID0+ICchbyFpJywKICAgICcxJyA9PiAnIWMhaScsCiAgICAnMicgPT4gJyFhIWknLAogICAgJzMnID0+ICchZSFpJywKKTsKCiRyZXBsYWNlbWVudHMgPSBhcnJheSgKICAgICcwJyA9PiAn0L4nLAogICAgJzEnID0+ICfRgScsCiAgICAnMicgPT4gJ9CwJywKICAgICczJyA9PiAn0LUnLAopOwoKZWNobyAi0JjRgdGF0L7QtNC90YvQuSDRgtC10LrRgdGCOlxueyR0ZXh0fSI7CgokcmVzdWx0ID0gQ2hlY2tpbmdFbmdsaXNoTGV0dGVyKCR0ZXh0KTsKZWNobyAiXG5cbtCf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