php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: -vit- at mail dot ru
New email:
PHP Version: OS:

 

 [2001-07-11 09:38 UTC] -vit- at mail dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Derick
 [2001-07-11 13:54 UTC] jeroen@php.net
You're looking for str_replace, strtr is something really different.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC