Easy Tutorial
❮ Func Xml Set Element Handler Func Cal Jewishtojd ❯

PHP str_rot13() Function

PHP String Reference Manual

Example

Encode and decode a string:


Definition and Usage

The str_rot13() function performs ROT13 encoding on a string.

ROT13 encoding shifts each letter 13 places forward in the alphabet. Numbers and non-alphabetic characters remain unchanged.

Note: Encoding and decoding are both handled by the same function. If you pass an already encoded string, it will return the original string.


Syntax

Parameter Description
string Required. Specifies the string to be encoded.

Technical Details

Return Value: Returns the ROT13 encoded string.
PHP Version: 4.2.0+
--- ---
Changelog: Prior to PHP 4.3, the string could be modified as if passed by reference.
--- ---

❮ Func Xml Set Element Handler Func Cal Jewishtojd ❯