Well, I can't understand what is the purpose of str_rot13 php function. I understand how it works but can't figure out in which situations is suitable for use. Can you give me some examples?
In cryptography, a Caesar cipher is one of the simplest and most widely known encryption techniques. -Wikipedia
There is nothing more to it, it's easy to implement and having it in the library wouldn't do harm. It can be used for spoilers (instead of a "show spoiler" button), for trivial encryption (a client-side config file, a hint in an online game), as fancy way to encode your email (avoid spam bots) or just for toying around. However, serious use is highly discouraged (unless you plan on bombing something).
As already told, you can use it for spoilers in forums.
You can also use it as an example of an idempotent unary function:
rot13(rot13( someString )) = someString
For each someString
.