From 7123e3dc020324cc51e4d76f3b763a10473111ec Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 20 Jun 2003 16:01:59 +0000 Subject: [PATCH] Add warning about potential BC break git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@132629 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/str-replace.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reference/strings/functions/str-replace.xml b/reference/strings/functions/str-replace.xml index 330d3cfb86..4f611f84d6 100644 --- a/reference/strings/functions/str-replace.xml +++ b/reference/strings/functions/str-replace.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,18 @@ In PHP 4.0.5 and later, every parameter to str_replace can be an array. + + + In PHP versions prior to 4.3.3 a bug existed when using arrays as + both search and replace + parameters which caused empty search indexes + to be skipped without advancing the internal pointer on the + replace array. This has been corrected in + PHP 4.3.3, any scripts which relied on this bug + should remove empty search values prior to calling this function in + order to mimick the original behavior. + + If subject is an array, then the search and replace is performed with every entry of