str_rot13
Perform a rot13 conversion on a string
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.
Encoding and decoding the string:
<?php echo str_rot13 ( "I love Shanghai" ) ; echo "<br>" ; echo str_rot13 ( "V ybir Funatunv" ) ; ?>
Try it yourself
str_rot13 ( string )
parameter | describe |
---|---|
string | Required. Specifies the string to be encoded. |