str_rot13

(PHP 4 >= 4.2.0, PHP 5, PHP 7)

str_rot13对字符串执行 ROT13 转换

说明

str_rot13 ( string $str ) : string

str 参数执行 ROT13 编码并将结果字符串返回。

ROT13 编码简单地使用字母表中后面第 13 个字母替换当前字母,同时忽略非字母表中的字符。编码和解码都使用相同的函数,传递一个编码过的字符串作为参数,将得到原始字符串。

参数

str

输入字符串。

返回值

返回给定字符串的 ROT13 版本。

范例

Example #1 str_rot13() 范例

<?php

echo str_rot13('PHP 4.3.0'); // CUC 4.3.0

?>