English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP str_rot13() Function Usage and Example

PHP String String Functions Manual

str_rot13() function is used to execute ROT on a string13 Conversion.

Syntax

string str_rot13 (string $str)

Definition and Usage

Execute ROT on the str parameter13 encode the result string and return it.
ROT13 Encoding simply uses the letter after the letter in the alphabet 13 letter replaces the current letter, while ignoring characters not in the alphabet. Encoding and decoding use the same function; pass an encoded string as a parameter, and you will get the original string.

Return Value

It returns the ROT of the given string.13Version

Parameter

Serial NumberParameter and Description
1

string

Input String

Online Example

Try the following example, on the string “PHP 7”Execute ROT13 Encoding.

<?php
   //on the string “PHP 7”Execute ROT13 Encoding.
   echo str_rot13('PHP 7'); 
?>
Test and see‹/›

Output Result

CUC 7

PHP String String Functions Manual