<?php
/* Коды для замены букв */
'а' => '1',
'б' => '2',
'в' => '3',
'г' => '4',
'д' => '5',
'е' => '6',
'ё' => '7',
'ж' => '8',
'з' => '9',
'и' => '0',
'й' => '#',
'н' => 'q',
'с' => 'R',
'п' => 's',
'р' => 'T',
'л' => 'y',
'я' => 'U',
'к' => 'i',
'о' => 'P'
);
$text = 'нас предали. явка провалена.';
$cipher = strtr($text, $code);
echo "Оригинал: {$text}\nШифровка: {$cipher}\n";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgovKiDQmtC+0LTRiyDQtNC70Y8g0LfQsNC80LXQvdGLINCx0YPQutCyICovCiRjb2RlID0gYXJyYXkoCiAgICAn0LAnCT0+CScxJywKICAgICfQsScJPT4JJzInLAogICAgJ9CyJwk9PgknMycsCiAgICAn0LMnCT0+CSc0JywKICAgICfQtCcJPT4JJzUnLAogICAgJ9C1Jwk9PgknNicsCiAgICAn0ZEnCT0+CSc3JywKICAgICfQticJPT4JJzgnLAogICAgJ9C3Jwk9PgknOScsCiAgICAn0LgnCT0+CScwJywKICAgICfQuScJPT4JJyMnLAogICAgJ9C9Jwk9PgkncScsCiAgICAn0YEnCT0+CSdSJywKICAgICfQvycJPT4JJ3MnLAogICAgJ9GAJwk9PgknVCcsCiAgICAn0LsnCT0+CSd5JywKICAgICfRjycJPT4JJ1UnLAogICAgJ9C6Jwk9PgknaScsCiAgICAn0L4nCT0+CSdQJwopOwoKJHRleHQgPSAn0L3QsNGBINC/0YDQtdC00LDQu9C4LiDRj9Cy0LrQsCDQv9GA0L7QstCw0LvQtdC90LAuJzsKJGNpcGhlciA9IHN0cnRyKCR0ZXh0LCAkY29kZSk7IAokZGVjaXBoZXIgPSBhcnJheV9mbGlwKCRjb2RlKTsgCgoKCmVjaG8gItCe0YDQuNCz0LjQvdCw0Ls6IHskdGV4dH1cbtCo0LjRhNGA0L7QstC60LA6IHskY2lwaGVyfVxuIjsKZWNobyB2YXJfZHVtcCgkY29kZSk7CgoKCg==