#34145 [Opn]: str_replace() malfunction?
| From: | haoyu dot guo at ocef dot org | Date: | Tue, 16 Aug 2005 07:22:51 +0000 |
| Subject: | #34145 [Opn]: str_replace() malfunction? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83627@lists.php.net to get a copy of this message | ||
ID: 34145
User updated by: haoyu dot guo at ocef dot org
Reported By: haoyu dot guo at ocef dot org
Status: Open
Bug Type: Strings related
Operating System: Redhat 9
PHP Version: 4.4.0
New Comment:
Correction:
Actual result:
--------------
nothing (on web)
<b (command line)
Previous Comments:
------------------------------------------------------------------------
[2005-08-16 09:21:38] haoyu dot guo at ocef dot org
Description:
------------
The following code prints nothing while run from web (Apache 2), while
it does print "<b" at command line. Could it be a bug or is that
something I don't know?
<?php
$idg = "<a";
$idg = str_replace("a", "b", $idg);
print $idg;
?>
Reproduce code:
---------------
<?php
$idg = "<a";
$idg = str_replace("a", "b", $idg);
print $idg;
?>
Expected result:
----------------
<b (on web)
<b (command line)
Actual result:
--------------
nothing (on web)
<a (command line)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34145&edit=1