Bug #12050 Updated: strtr strange results

From: Date: Wed, 11 Jul 2001 17:54:56 +0000
Subject: Bug #12050 Updated: strtr strange results
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59729@lists.php.net to get a copy of this message
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)

« previous php.dev (#59729) next »