<?php
/* Коды для замены букв */
'а' => '1',
'б' => '2',
'в' => '3',
'г' => '4',
'д' => '5',
'е' => '6',
'ё' => '7',
'ж' => '8',
'з' => '9',
'и' => '0',
'й' => '#',
'н' => '8',
'п' => '%',
);
$text = 'нас предали. явка провалена.';
$cipher = strtr($text, $code); echo "Оригинал: {$text}\nШифровка: {$cipher}\nрасшифровка {$ras} " ;
PD9waHAKIAplcnJvcl9yZXBvcnRpbmcoLTEpOwogCi8qINCa0L7QtNGLINC00LvRjyDQt9Cw0LzQtdC90Ysg0LHRg9C60LIgKi8KJGNvZGUgPSBhcnJheSgKICAgICfQsCcJPT4JJzEnLAogICAgJ9CxJwk9PgknMicsCiAgICAn0LInCT0+CSczJywKICAgICfQsycJPT4JJzQnLAogICAgJ9C0Jwk9PgknNScsCiAgICAn0LUnCT0+CSc2JywKICAgICfRkScJPT4JJzcnLAogICAgJ9C2Jwk9PgknOCcsCiAgICAn0LcnCT0+CSc5JywKICAgICfQuCcJPT4JJzAnLAogICAgJ9C5Jwk9PgknIycsCiAgICAn0L0nID0+ICAgJzgnLAogICAgJ9C/JyA9PiAnJScsCik7CiAKJHRleHQgPSAn0L3QsNGBINC/0YDQtdC00LDQu9C4LiDRj9Cy0LrQsCDQv9GA0L7QstCw0LvQtdC90LAuJzsKJGNpcGhlciA9IHN0cnRyKCR0ZXh0LCAkY29kZSk7CiRyYXMgPSBhcnJheV9mbGlwICgkdGV4dCk7CmVjaG8gItCe0YDQuNCz0LjQvdCw0Ls6IHskdGV4dH1cbtCo0LjRhNGA0L7QstC60LA6IHskY2lwaGVyfVxu0YDQsNGB0YjQuNGE0YDQvtCy0LrQsCB7JHJhc30gIiA7