array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.str-rot13.php', 1 => 'str_rot13', ), 'up' => array ( 0 => 'ref.strings.php', 1 => 'Funções de 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' => 'pt_BR', '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 — Executa a transformação rot13 em uma string
Executa a codificação ROT13 no argumento string
e retorna a string resultante.
A codificação ROT13 simplesmente troca cada letra por 13 lugares no alfabeto, enquanto não muda os caracteres não alfabéticos. Codificação e decodificação são feitos pela mesma função, passando uma string codificada como argumento retornará a string com a versão original.
string
A string de entrada.
Retorna a versão ROT13 de uma dada string.
Exemplo #1 Exemplo de str_rot13()
<?php
echo str_rot13('PHP 8.3.0'); // CUC 8.3.0
?>