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.

Example

Encoding and decoding the string:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">str_rot13</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"I love Shanghai"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token string double-quoted-string">"<br>"</span> <span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">str_rot13</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"V ybir Funatunv"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Try it yourself

Similar Functions
  • Output one or more strings echo

    echo

    Outputoneormorestrin
  • Randomly disrupt a string str_shuffle

    str_shuffle

    Randomlydisruptastri
  • Get the length of the starting substring that does not match the mask strcspn

    strcspn

    Getthelengthofthesta
  • Find the location where the string first appears (case insensitive) stripos

    stripos

    Findthelocationwhere
  • Use another string to fill a string to a length str_pad

    str_pad

    Useanotherstringtofi
  • Calculate the soundex key of a string soundex

    soundex

    Calculatethesoundexk
  • Generate single-byte strings from numbers chr

    chr

    Generatesingle-bytes
  • Delete whitespace characters (or other characters) at the end of the string rtrim

    rtrim

    Deletewhitespacechar