|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12050 strtr strange results
Submitted: 2001-07-11 09:38 UTC Modified: 2001-07-11 13:54 UTC
From: -vit- at mail dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.0.6 OS: Win2K, WinNT 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: -vit- at mail dot ru
New email:
PHP Version: OS:


 [2001-07-11 09:38 UTC] -vit- at mail dot ru

with 2 parameters all work fine.

With 3 parameters function return:


strtr("Function resut is BAD", "BAD", "all right")
Result: 'Function resut is all'


strtr("Function resut is BAD", "BAD", "ok")
Result: 'Function resut is okD'


strtr("Function resut is BAD", "BAD", "")
Result: 'Function resut is BAD'

Thx 4 attention


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-11 09:40 UTC]
This is normal behavior, see for more information.

 [2001-07-11 13:54 UTC]
You're looking for str_replace, strtr is something really different.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Oct 03 04:05:53 2022 UTC