Search code examples
phpdecodeencoderot13

How rot13 on a string using PHP?


I have a big php code that i want to encode and decode it manually.
My problem is that php code has many single quotes and double quotes inside and because of them i have errors while using str_rot13() function like below...
So what is the correct syntax and how can I use the function below for encode:

str_rot13 ('That php Code');

And how can i decode that encoded file? I couldn't find a reverse function!

thanks in advance


Solution

  • The nice thing about rot13 is that it's reflective. applying rot 13 twice (e.g. rot 26) brings you right back to where you came from.