Computer >> Computer tutorials >  >> Programming >> PHP

str_rot13() function in PHP


The str_rot13() function is used to perform the rot13 transform on a string.

Syntax

str_rot13(str)

Parameters

  • str − The string to encode

Return

The str_rot13() function returns the ROT13 version of the encoded string.

Example

The following is an example −

<?php
   echo str_rot13("Demo text");
?>

Output

The following is the output −

Qrzb grkg