str_rot13()
str_rot13() — Perform the rot13 transform on a string.
Built-in function of PHP 8.5. The manual lists it as available in PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
What it does
Performs the ROT13 encoding on the string argument and returns the resulting string.
Signature
str_rot13(string $string): string
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $string | string | The input string. |
Return value
Returns the ROT13 version of the given string.
Example
A runnable snippet:
echo str_rot13('PHP 4.3.0'); // CUC 4.3.0
All PHP 8.5 built-in functions
Reference card built from the PHP manual page str_rot13() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.