reference/strings/functions/str-ireplace.xml
464fbf0d12f89b1e723908780fb68acf667f5901
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-ireplace">
3
+
<refentry xml:id="function.str-ireplace" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>str_ireplace</refname>
6
6
<refpurpose>Case-insensitive version of <function>str_replace</function></refpurpose>
...
...
@@ -9,19 +9,22 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>mixed</type><methodname>str_ireplace</methodname>
13
-
<methodparam><type>mixed</type><parameter>search</parameter></methodparam>
14
-
<methodparam><type>mixed</type><parameter>replace</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter>subject</parameter></methodparam>
16
-
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter></methodparam>
12
+
<type class="union"><type>string</type><type>array</type></type><methodname>str_ireplace</methodname>
13
+
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>search</parameter></methodparam>
14
+
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>replace</parameter></methodparam>
15
+
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>subject</parameter></methodparam>
16
+
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
This function returns a string or an array with all occurrences of
20
20
<parameter>search</parameter> in <parameter>subject</parameter>
21
21
(ignoring case) replaced with the given <parameter>replace</parameter>
22
-
value. If you don't need fancy replacing rules, you should generally
23
-
use this function instead of
24
-
<function>preg_replace</function> with the <literal>i</literal> modifier.
22
+
value.
23
+
</para>
24
+
<para>
25
+
To replace text based on a pattern rather than a fixed string,
26
+
use <function>preg_replace</function> with the <literal>i</literal>
27
+
<link linkend="reference.pcre.pattern.modifiers">pattern modifier</link>.
25
28
</para>
26
29
</refsect1>
27
30

...
...
@@ -97,6 +100,23 @@
97
100
</para>
98
101
</refsect1>
99
102

103
+
<refsect1 role="changelog">
104
+
&reftitle.changelog;
105
+
<informaltable>
106
+
<tgroup cols="2">
107
+
<thead>
108
+
<row>
109
+
<entry>&Version;</entry>
110
+
<entry>&Description;</entry>
111
+
</row>
112
+
</thead>
113
+
<tbody>
114
+
&strings.changelog.ascii-case-folding;
115
+
</tbody>
116
+
</tgroup>
117
+
</informaltable>
118
+
</refsect1>
119
+

100
120
<refsect1 role="examples">
101
121
&reftitle.examples;
102
122
<para>
...
...
@@ -140,7 +160,6 @@ echo $bodytag; // <body text=black>
140
160
</refsect1>
141
161

142
162
</refentry>
143
-

144
163
<!-- Keep this comment at the end of the file
145
164
Local variables:
146
165
mode: sgml
147
166