PHP 4.0 Bug #8597: problem in str_replace
| From: | jeff at procata dot com | Date: | Mon, 08 Jan 2001 15:56:24 +0000 |
| Subject: | PHP 4.0 Bug #8597: problem in str_replace | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-43393@lists.php.net to get a copy of this message | ||
From: jeff@procata.com
Operating system: linux
PHP version: 4.0.2
PHP Bug Type: *Function Specific
Bug description: problem in str_replace
The following code:
$key = "test";
echo str_replace("{$key}", "Replaced", "abc {test} xyz");
produces incorrect output:
abc {Replaced} xyz
where the equivelant code:
echo str_replace("{test}", "Replaced", "abc {test} xyz");
produces the correct output:
abc Replaced xyz
--
Edit Bug report at: http://bugs.php.net/?id=8597&edit=1