pollita Fri Jun 20 12:02:00 2003 EDT Modified files: /phpdoc/en/reference/strings/functions str-replace.xml Log: Add warning about potential BC break Index: phpdoc/en/reference/strings/functions/str-replace.xml diff -u phpdoc/en/reference/strings/functions/str-replace.xml:1.6 phpdoc/en/reference/strings/functions/str-replace.xml:1.7 --- phpdoc/en/reference/strings/functions/str-replace.xml:1.6 Fri May 30 12:47:59 2003 +++ phpdoc/en/reference/strings/functions/str-replace.xml Fri Jun 20 12:01:59 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> <refentry id="function.str-replace"> <refnamediv> @@ -29,6 +29,18 @@ In PHP 4.0.5 and later, every parameter to <function>str_replace</function> can be an array. </para> + <warning> + <simpara> + In PHP versions prior to 4.3.3 a bug existed when using arrays as + both <parameter>search</parameter> and <parameter>replace</parameter> + parameters which caused empty <parameter>search</parameter> indexes + to be skipped without advancing the internal pointer on the + <parameter>replace</parameter> array. This has been corrected in + <literal>PHP 4.3.3</literal>, any scripts which relied on this bug + should remove empty search values prior to calling this function in + order to mimick the original behavior. + </simpara> + </warning> <para> If <parameter>subject</parameter> is an array, then the search and replace is performed with every entry of
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php