Bug #12050 Updated: strtr strange results
ID: 12050
Updated by: jeroen
Reported By: -vit-@mail.ru
Status: Bogus
Bug Type: *General Issues
Operating System: Win2K, WinNT 4
PHP Version: 4.0.6
New Comment:
You're looking for str_replace, strtr is something really different.
Previous Comments:
------------------------------------------------------------------------
[2001-07-11 09:40:33] derick@php.net
This is normal behavior, see www.php.net/strtr for more information.
Derick
------------------------------------------------------------------------
[2001-07-11 09:38:33] -vit-@mail.ru
Hi!
with 2 parameters all work fine.
With 3 parameters function return:
Example1:
strtr("Function resut is BAD", "BAD", "all right")
Result: 'Function resut is all'
Example2:
strtr("Function resut is BAD", "BAD", "ok")
Result: 'Function resut is okD'
Example3:
strtr("Function resut is BAD", "BAD", "")
Result: 'Function resut is BAD'
Thx 4 attention
------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12050&edit=1
Thread (3 messages)