이것은 13 번째 캐릭터가 공격을받을 때까지 작동합니다. str_ireplace가 cyper 배열에서 "a"에 도달하면 str_ireplace가 작동을 멈 춥니 다.PHP str_replace의 글자 수 제한이 13자를 초과합니까?
배열의 크기에 제한이 있습니까? "abgf"를 입력하면 "nots"가 나오지만 "abgrf"를 입력하면 "notes"를 얻을 수 있으므로 "notrs"가 표시됩니다. 건드리지 못한 내 뇌는 그걸 알아낼 수 없습니다.
$_cypher = array("n","o","p","q","r","s","t","u","v","w","x","y","z","a","b","c","d","e","f","g","h","i","j","k","l","m");
$_needle = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$_decryptedText = str_ireplace($_cypher, $_needle, $_text);
echo $_decryptedText;
도움 말?
http://php.net/manual/en/function.str-rot13.php – Brad