[PHP-DEV] PHP 4.0 Bug #8597: problem in str_replace From: jeff <email protected>
Date: 01/08/01

From: jeff <email protected>
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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>