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