array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.str-rot13.php', 1 => 'str_rot13', ), 'up' => array ( 0 => 'ref.strings.php', 1 => 'String 関数', ), 'prev' => array ( 0 => 'function.str-replace.php', 1 => 'str_replace', ), 'next' => array ( 0 => 'function.str-shuffle.php', 1 => 'str_shuffle', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/strings/functions/str-rot13.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
str_rot13 — 文字列に rot13 変換を行う
引数 string
に対して ROT13 変換を施し、
その結果の文字列を返します。
ROT13 は、各文字をアルファベット順に 13 文字シフトさせ、 アルファベット以外の文字はそのままとするエンコードを行います。 エンコードとデコードは同じ関数で行われます。 引数にエンコードされた文字列を指定した場合には、元の文字列が返されます。
string
入力文字列。
指定した文字列を ROT13 変換した結果を返します。
例1 str_rot13() の例
<?php
echo str_rot13('PHP 4.3.0'); // CUC 4.3.0
?>