#46193 [Opn->Bgs]: str_replace() generates unexpected results

From: Date: Sun, 28 Sep 2008 21:32:36 +0000
Subject: #46193 [Opn->Bgs]: str_replace() generates unexpected results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129305@lists.php.net to get a copy of this message
 ID:               46193
 Updated by:       pajoye@php.net
 Reported By:      muqtada at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: windows
 PHP Version:      5.2.6
 New Comment:

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use "\\" and not
"\".



Previous Comments:
------------------------------------------------------------------------

[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:
------------
i tried following script
print str_replace("wwwroot/test/wp","\");
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace("wwwroot/mycode/wp","\");
its results in wwwroot\mycode\wp



Expected result:
----------------
wwwroot/test/wp



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46193&edit=1



Thread (7 messages)

« previous php.bugs (#129305) next »