Bug #16352 Updated: different implementation of str_replace on windows and linux
| From: | jtate@php.net | Date: | Tue, 09 Apr 2002 16:01:22 +0000 |
| Subject: | Bug #16352 Updated: different implementation of str_replace on windows and linux | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4452@lists.php.net to get a copy of this message | ||
ID: 16352
Updated by: jtate@php.net
Reported By: admin@students-fhtw.de
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: windows
PHP Version: 4.1.1
New Comment:
???
On linux $getQuery = str_replace("\"", "", $getQuery);
On windows $getQuery = str_replace("\"", "", $getQuery);
\\ means \ \" means " so \\\" means \".
Previous Comments:
------------------------------------------------------------------------
[2002-03-29 15:29:24] admin@students-fhtw.de
str_replace() produces different output on windows and on linux:
php versions:
windows: 4.1.1
linux: 4.0.5
situation:
I wanted to delete all quotations in a string, that came from GET
query.
script:
on linux:
$getQuery = str_replace("\"", "", $getQuery);
on windows:
$getQuery = str_replace("\\\"", "", $getQuery);
conclusion:
On windows, the character [\"] is not seen as one character but as
two.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16352&edit=1