Skip to content

Commit 55e2079

Browse files
authored
Filter: Rewrite INI page (#4146)
Remove personalization, add warning about deprecation
1 parent 87f3287 commit 55e2079

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

reference/filter/ini.xml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@
3232
</tgroup>
3333
</table>
3434
&ini.php.constants;
35-
</para>
35+
</para>
3636

37-
&ini.descriptions.title;
37+
&ini.descriptions.title;
3838

39-
<para>
4039
<variablelist>
4140
<varlistentry xml:id="ini.filter.default">
4241
<term>
@@ -51,51 +50,52 @@
5150
Original data can be accessed through <function>filter_input</function>.
5251
</para>
5352
<para>
54-
Accepts the name of the filter you like to use by default. See the
55-
existing <link linkend="filter.filters">filter list</link> for the list
56-
of the filter names.
53+
Must be the name of a filter which can be determined by using
54+
<function>filter_list</function> and <function>filter_id</function>.
5755
</para>
5856
<note>
59-
<para>
60-
Be careful about the default flags for the default filters. You should explicitly
61-
set them to the value you want. For example, to configure the default filter to
62-
behave exactly like <function>htmlspecialchars</function> you need to set them
63-
default flags to 0 as shown below.
64-
</para>
65-
<para>
66-
<example>
67-
<title>Configuring the default filter to act like htmlspecialchars</title>
68-
<programlisting role="php">
57+
<simpara>
58+
Be careful about the default flags for the default filters.
59+
They should be set explicitly.
60+
For example, to configure the default filter to behave exactly like
61+
<function>htmlspecialchars</function> the default flags must be set to
62+
<literal>0</literal>, as shown in the example below.
63+
</simpara>
64+
<example>
65+
<title>Configuring the default filter to act like htmlspecialchars</title>
66+
<programlisting role="php">
6967
<![CDATA[
7068
filter.default = full_special_chars
7169
filter.default_flags = 0
7270
]]>
73-
</programlisting>
74-
</example>
75-
</para>
76-
</note>
71+
</programlisting>
72+
</example>
73+
</note>
74+
<warning>
75+
<simpara>
76+
This INI setting is deprecated as of PHP 8.1.0.
77+
</simpara>
78+
</warning>
7779
</listitem>
7880
</varlistentry>
79-
81+
8082
<varlistentry xml:id="ini.filter.default-flags">
8183
<term>
8284
<parameter>filter.default_flags</parameter>
8385
<type>int</type>
8486
</term>
8587
<listitem>
86-
<para>
87-
Default flags to apply when the default filter is set. This is set to
88-
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant> by default for backwards
89-
compatibility reasons. See the <link linkend="filter.filters.flags">flag list</link>
90-
for the list of all the flag names.
91-
</para>
88+
<simpara>
89+
Default flags to apply when the default filter is set.
90+
This is set to <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>
91+
by default for backwards compatibility reasons.
92+
See <constant>FILTER_FLAG_<replaceable>*</replaceable></constant>
93+
constants for available flags.
94+
</simpara>
9295
</listitem>
9396
</varlistentry>
94-
9597
</variablelist>
96-
</para>
9798
</section>
98-
9999
<!-- Keep this comment at the end of the file
100100
Local variables:
101101
mode: sgml

0 commit comments

Comments
 (0)