<?php
/* Коды для замены букв */
'а' => '01' , 'б' => '02' ,
'в' => '03' , 'г' => '04' ,
'д' => '05' , 'е' => '06' ,
'ё' => '07' , 'ж' => '08' ,
'з' => '09' , 'и' => '10' ,
'й' => '11' , 'к' => '12' ,
'м' => '13' , 'н' => '14' ,
'о' => '15' , 'р' => '16' ,
'с' => '17' , 'т' => '18' ,
'у' => '19' , 'ф' => '20' ,
'х' => '21' , 'ц' => '22' ,
'ч' => '23' , 'э' => '24' ,
'ю' => '25' , 'я' => '27' ,
' ' => '28' , 'п' => '29' ,
'тест' => 'xxx'
) ;
$test = 'зашифруем это сообщение и посмотрим что получится тест' ;
$result = strtr ( $test , $code ) ;
echo "$result \n " ;
$uncode = strtr ( $result , $decode ) ;
echo $uncode ;
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgovKiDQmtC+0LTRiyDQtNC70Y8g0LfQsNC80LXQvdGLINCx0YPQutCyICovCiRjb2RlID0gYXJyYXkoCiAgICAn0LAnCT0+CScwMScsICAgICfQsScJPT4JJzAyJywKICAgICfQsicJPT4JJzAzJywgICAgJ9CzJwk9PgknMDQnLAogICAgJ9C0Jwk9PgknMDUnLCAgICAn0LUnCT0+CScwNicsCiAgICAn0ZEnCT0+CScwNycsICAgICfQticJPT4JJzA4JywKICAgICfQtycJPT4JJzA5JywgICAgJ9C4Jwk9PgknMTAnLAogICAgJ9C5Jwk9PgknMTEnLCAgICAn0LonCT0+CScxMicsCiAgICAn0LwnCT0+CScxMycsICAgICfQvScJPT4JJzE0JywKICAgICfQvicJPT4JJzE1JywgICAgJ9GAJwk9PgknMTYnLAogICAgJ9GBJwk9PgknMTcnLCAgICAn0YInCT0+CScxOCcsCiAgICAn0YMnCT0+CScxOScsICAgICfRhCcJPT4JJzIwJywKICAgICfRhScJPT4JJzIxJywgICAgJ9GGJwk9PgknMjInLAogICAgJ9GHJwk9PgknMjMnLCAgICAn0Y0nCT0+CScyNCcsCiAgICAn0Y4nCT0+CScyNScsICAgICfRjyc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