bug in str_replace() ?
| From: | Martin Lindhe | Date: | Sun, 21 Oct 2001 14:45:02 +0000 |
| Subject: | bug in str_replace() ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71737@lists.php.net to get a copy of this message | ||
Bug in str_replace(), PHP 4.0.6
$text = "hello world";
$out = str_replace(" "," ",$text);
echo $out;
Expected output:
"hello world"
Actual output:
"hello world"
Of course, this is what happens if str_replace() does replacements on input,
but not on the soon-to-be output it is working on. Is this to be expected,
or would it be ok to modify the functionality of str_replace()?
/Martin