Current Location: Home> Function Categories> str_rot13

str_rot13

Perform a rot13 conversion on a string
Name:str_rot13
Category:String
Programming Language:php
One-line Description:Perform ROT13 encoding on the string.

Definition and usage

str_rot13() function performs ROT13 encoding on the string.

ROT13 code moves each letter forward by 13 letters in the alphabet. Numbers and non-alphabetical characters remain the same.

Tip: Encoding and decoding are both done by the same function. If you take the encoded string as an argument, the original string will be returned.

Example

Encoding and decoding the string:

 <?php
echo str_rot13 ( "I love Shanghai" ) ;
echo "<br>" ;
echo str_rot13 ( "V ybir Funatunv" ) ;
?>

Try it yourself

grammar

 str_rot13 ( string )
parameter describe
string Required. Specifies the string to be encoded.
Similar Functions
Popular Articles