|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-16 19:03 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
Description: ------------ str_replace does not replace all array values with the associated array replace. Reproduce code: --------------- <?php $string = "test"; test($string); function test($datei) { $search_s=range('a','z'); $replace_s=range('z','a'); $code = str_replace($search_s, $replace_s, $datei); echo $code."\n"; $decode = str_replace($replace_s, $search_s, $code); echo $decode; } ?> Expected result: ---------------- gvhg test Actual result: -------------- gehg tvst