fork(1) download
  1. <?php
  2.  
  3.  
  4. $letters = explode(' ', "а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь ю я");
  5. $translation = explode(' ', "1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * ( ) _ - + = [ ] { } ; : ' `");
  6. $code = array_combine($letters, $translation);
  7.  
  8. $text = "нас предали, явка провалена.";
  9. echo $cipher = strtr($text, $code) . "\n";
  10.  
  11. $decode = array_flip($code);
  12.  
  13. echo $cipher = strtr($text, $decode) . "\n";
  14.  
  15. // your code goes here
Success #stdin #stdout 0.02s 26468KB
stdin
Standard input is empty
stdout
%1( &*651#0, `3@1 &*^31#6%1.
нас предали, явка провалена.