Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cipher = readline();
- $substring = explode(' ', readline());
- for ($i = 0; $i < strlen($cipher); $i++) {
- $letter = $cipher[$i];
- if (ord($letter) >= ord('d') && ord($letter) <= ord('z') ||
- $letter === '{' || $letter === '}' || $letter === '|' || $letter === '#') {
- $cipher[$i] = chr(ord($letter) - 3);
- } else {
- echo 'This is not the book you are looking for.';
- return;
- }
- }
- $decipher = str_replace($substring[0], $substring[1], $cipher);
- echo $decipher;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement