reference/filter/filters.xml
53054bf8decc8648cf2e90a493692a161e2371af
...
...
@@ -1,659 +0,0 @@
1
-
<?xml version="1.0" encoding="utf-8"?>
2
-
<!-- $Revision$ -->
3
-
<chapter xml:id="filter.filters" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
-
<title>Types of filters</title>
5
-

6
-
<!--Validate filters: {{{-->
7
-
<section xml:id="filter.filters.validate">
8
-
<title>Validate filters</title>
9
-
<para>
10
-
<table>
11
-
<title>Listing of filters for validation</title>
12
-
<tgroup cols="5">
13
-
<thead>
14
-
<row>
15
-
<entry>ID</entry>
16
-
<entry>Name</entry>
17
-
<entry>Options</entry>
18
-
<entry>Flags</entry>
19
-
<entry>Description</entry>
20
-
</row>
21
-
</thead>
22
-
<tbody>
23
-
<row>
24
-
<entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry>
25
-
<entry>"boolean"</entry>
26
-
<entry>
27
-
<parameter>default</parameter>
28
-
</entry>
29
-
<entry>
30
-
<constant>FILTER_NULL_ON_FAILURE</constant>
31
-
</entry>
32
-
<entry>
33
-
<para>
34
-
Returns &true; for "1", "true", "on" and "yes".
35
-
Returns &false; otherwise.
36
-
</para>
37
-
<para>
38
-
If <constant>FILTER_NULL_ON_FAILURE</constant> is set, &false; is
39
-
returned only for "0", "false", "off", "no", and "", and
40
-
&null; is returned for all non-boolean values.
41
-
</para>
42
-
</entry>
43
-
</row>
44
-
<row>
45
-
<entry><constant>FILTER_VALIDATE_EMAIL</constant></entry>
46
-
<entry>"validate_email"</entry>
47
-
<entry>
48
-
<parameter>default</parameter>
49
-
</entry>
50
-
<entry></entry>
51
-
<entry>
52
-
<para>
53
-
Validates whether the value is a valid e-mail address.
54
-
</para>
55
-
<para>
56
-
In general, this validates e-mail addresses against the syntax in
57
-
RFC 822, with the exceptions that comments and whitespace folding
58
-
are not supported.
59
-
</para>
60
-
</entry>
61
-
</row>
62
-
<row>
63
-
<entry><constant>FILTER_VALIDATE_FLOAT</constant></entry>
64
-
<entry>"float"</entry>
65
-
<entry>
66
-
<parameter>default</parameter>,
67
-
<parameter>decimal</parameter>
68
-
</entry>
69
-
<entry>
70
-
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>
71
-
</entry>
72
-
<entry>Validates value as float, and converts to float on success.</entry>
73
-
</row>
74
-
<row>
75
-
<entry><constant>FILTER_VALIDATE_INT</constant></entry>
76
-
<entry>"int"</entry>
77
-
<entry>
78
-
<parameter>default</parameter>,
79
-
<parameter>min_range</parameter>,
80
-
<parameter>max_range</parameter>
81
-
</entry>
82
-
<entry>
83
-
<constant>FILTER_FLAG_ALLOW_OCTAL</constant>,
84
-
<constant>FILTER_FLAG_ALLOW_HEX</constant>
85
-
</entry>
86
-
<entry>Validates value as integer, optionally from the specified range, and converts to int on success.</entry>
87
-
</row>
88
-
<row>
89
-
<entry><constant>FILTER_VALIDATE_IP</constant></entry>
90
-
<entry>"validate_ip"</entry>
91
-
<entry>
92
-
<parameter>default</parameter>
93
-
</entry>
94
-
<entry>
95
-
<constant>FILTER_FLAG_IPV4</constant>,
96
-
<constant>FILTER_FLAG_IPV6</constant>,
97
-
<constant>FILTER_FLAG_NO_PRIV_RANGE</constant>,
98
-
<constant>FILTER_FLAG_NO_RES_RANGE</constant>
99
-
</entry>
100
-
<entry>
101
-
Validates value as IP address, optionally only IPv4 or IPv6 or not
102
-
from private or reserved ranges.
103
-
</entry>
104
-
</row>
105
-
<row>
106
-
<entry><constant>FILTER_VALIDATE_MAC</constant></entry>
107
-
<entry>"validate_mac_address"</entry>
108
-
<entry>
109
-
<parameter>default</parameter>
110
-
</entry>
111
-
<entry></entry>
112
-
<entry>Validates value as MAC address.</entry>
113
-
</row>
114
-
<row>
115
-
<entry><constant>FILTER_VALIDATE_REGEXP</constant></entry>
116
-
<entry>"validate_regexp"</entry>
117
-
<entry>
118
-
<parameter>default</parameter>,
119
-
<parameter>regexp</parameter>
120
-
</entry>
121
-
<entry></entry>
122
-
<entry>
123
-
Validates value against <parameter>regexp</parameter>, a
124
-
<link linkend="book.pcre">Perl-compatible</link> regular expression.
125
-
</entry>
126
-
</row>
127
-
<row>
128
-
<entry><constant>FILTER_VALIDATE_URL</constant></entry>
129
-
<entry>"validate_url"</entry>
130
-
<entry>
131
-
<parameter>default</parameter>
132
-
</entry>
133
-
<entry>
134
-
<constant>FILTER_FLAG_PATH_REQUIRED</constant>,
135
-
<constant>FILTER_FLAG_QUERY_REQUIRED</constant>
136
-
</entry>
137
-
<entry>Validates value as URL (according to <link xlink:href="&url.rfc;2396">&url.rfc;2396</link>), optionally with required components. Beware a valid URL may not specify the HTTP protocol <literal>http://</literal> so further validation may be required to determine the URL uses an expected protocol, e.g. <literal>ssh://</literal> or <literal>mailto:</literal>. Note that the function will only find ASCII URLs to be valid; internationalized domain names (containing non-ASCII characters) will fail.</entry>
138
-
</row>
139
-
</tbody>
140
-
</tgroup>
141
-
</table>
142
-
</para>
143
-
<note>
144
-
<para>
145
-
As of PHP 5.4.11, the numbers +0 and -0 validate as both integers as well
146
-
as floats (using <constant>FILTER_VALIDATE_FLOAT</constant> and
147
-
<constant>FILTER_VALIDATE_INT</constant>). Before PHP 5.4.11 they only
148
-
validated as floats (using <constant>FILTER_VALIDATE_FLOAT</constant>).
149
-
</para>
150
-
<para>
151
-
When <parameter>default</parameter> is set to option, <parameter>default</parameter>'s value is used if value is not validated.
152
-
</para>
153
-
</note>
154
-

155
-
<simplesect role="changelog">
156
-
&reftitle.changelog;
157
-
<para>
158
-
<informaltable>
159
-
<tgroup cols="2">
160
-
<thead>
161
-
<row>
162
-
<entry>&Version;</entry>
163
-
<entry>&Description;</entry>
164
-
</row>
165
-
</thead>
166
-
<tbody>
167
-
<row>
168
-
<entry>5.5.0</entry>
169
-
<entry>
170
-
Added <constant>FILTER_VALIDATE_MAC</constant>
171
-
</entry>
172
-
</row>
173
-
</tbody>
174
-
</tgroup>
175
-
</informaltable>
176
-
</para>
177
-
</simplesect>
178
-

179
-
</section>
180
-
<!--}}}-->
181
-

182
-
<!-- Sanitize filters: {{{-->
183
-
<section xml:id="filter.filters.sanitize">
184
-
<title>Sanitize filters</title>
185
-
<para>
186
-
<table>
187
-
<title>List of filters for sanitization</title>
188
-
<tgroup cols="5">
189
-
<thead>
190
-
<row>
191
-
<entry>ID</entry>
192
-
<entry>Name</entry>
193
-
<entry>Flags</entry>
194
-
<entry>Description</entry>
195
-
</row>
196
-
</thead>
197
-
<tbody>
198
-
<row>
199
-
<entry><constant>FILTER_SANITIZE_EMAIL</constant></entry>
200
-
<entry>"email"</entry>
201
-
<entry></entry>
202
-
<entry>
203
-
Remove all characters except letters, digits and
204
-
<literal>!#$%&amp;'*+-=?^_`{|}~@.[]</literal>.
205
-
</entry>
206
-
</row>
207
-
<row>
208
-
<entry><constant>FILTER_SANITIZE_ENCODED</constant></entry>
209
-
<entry>"encoded"</entry>
210
-
<entry>
211
-
<constant>FILTER_FLAG_STRIP_LOW</constant>,
212
-
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
213
-
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
214
-
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
215
-
</entry>
216
-
<entry>URL-encode string, optionally strip or encode special characters.</entry>
217
-
</row>
218
-
<row>
219
-
<entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry>
220
-
<entry>"magic_quotes"</entry>
221
-
<entry></entry>
222
-
<entry>Apply <function>addslashes</function>.</entry>
223
-
</row>
224
-
<row>
225
-
<entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry>
226
-
<entry>"number_float"</entry>
227
-
<entry>
228
-
<constant>FILTER_FLAG_ALLOW_FRACTION</constant>,
229
-
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>,
230
-
<constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant>
231
-
</entry>
232
-
<entry>
233
-
Remove all characters except digits, <literal>+-</literal> and
234
-
optionally <literal>.,eE</literal>.
235
-
</entry>
236
-
</row>
237
-
<row>
238
-
<entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry>
239
-
<entry>"number_int"</entry>
240
-
<entry></entry>
241
-
<entry>
242
-
Remove all characters except digits, plus and minus sign.
243
-
</entry>
244
-
</row>
245
-
<row>
246
-
<entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry>
247
-
<entry>"special_chars"</entry>
248
-
<entry>
249
-
<constant>FILTER_FLAG_STRIP_LOW</constant>,
250
-
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
251
-
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
252
-
</entry>
253
-
<entry>
254
-
HTML-escape <literal>'"&lt;&gt;&amp;</literal> and characters with
255
-
ASCII value less than 32, optionally strip or encode other special
256
-
characters.
257
-
</entry>
258
-
</row>
259
-
<row>
260
-
<entry><constant>FILTER_SANITIZE_FULL_SPECIAL_CHARS</constant></entry>
261
-
<entry>"full_special_chars"</entry>
262
-
<entry>
263
-
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>,
264
-
</entry>
265
-
<entry>
266
-
Equivalent to calling <function>htmlspecialchars</function> with <constant>ENT_QUOTES</constant> set. Encoding quotes can
267
-
be disabled by setting <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>. Like <function>htmlspecialchars</function>, this
268
-
filter is aware of the <link linkend="ini.default-charset">default_charset</link> and if a sequence of bytes is detected that
269
-
makes up an invalid character in the current character set then the entire string is rejected resulting in a 0-length string.
270
-
When using this filter as a default filter, see the warning below about setting the default flags to 0.
271
-
</entry>
272
-
</row>
273
-
<row>
274
-
<entry><constant>FILTER_SANITIZE_STRING</constant></entry>
275
-
<entry>"string"</entry>
276
-
<entry>
277
-
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>,
278
-
<constant>FILTER_FLAG_STRIP_LOW</constant>,
279
-
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
280
-
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
281
-
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
282
-
<constant>FILTER_FLAG_ENCODE_AMP</constant>
283
-
</entry>
284
-
<entry>Strip tags, optionally strip or encode special characters.</entry>
285
-
</row>
286
-
<row>
287
-
<entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry>
288
-
<entry>"stripped"</entry>
289
-
<entry></entry>
290
-
<entry>Alias of "string" filter.</entry>
291
-
</row>
292
-
<row>
293
-
<entry><constant>FILTER_SANITIZE_URL</constant></entry>
294
-
<entry>"url"</entry>
295
-
<entry></entry>
296
-
<entry>
297
-
Remove all characters except letters, digits and
298
-
<literal>$-_.+!*'(),{}|\\^~[]`&lt;&gt;#%";/?:@&amp;=</literal>.
299
-
</entry>
300
-
</row>
301
-
<row>
302
-
<entry><constant>FILTER_UNSAFE_RAW</constant></entry>
303
-
<entry>"unsafe_raw"</entry>
304
-
<entry>
305
-
<constant>FILTER_FLAG_STRIP_LOW</constant>,
306
-
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
307
-
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
308
-
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
309
-
<constant>FILTER_FLAG_ENCODE_AMP</constant>
310
-
</entry>
311
-
<entry>
312
-
Do nothing, optionally strip or encode special characters. This
313
-
filter is also aliased to <constant>FILTER_DEFAULT</constant>.
314
-
</entry>
315
-
</row>
316
-
</tbody>
317
-
</tgroup>
318
-
</table>
319
-
</para>
320
-
<warning>
321
-
<para>
322
-
When using one of these filters as a default filter either through your ini file
323
-
or through your web server's configuration, the default flags is set to
324
-
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>. You need to explicitly set
325
-
filter.default_flags to 0 to have quotes encoded by default. Like this:
326
-
<example>
327
-
<title>Configuring the default filter to act like htmlspecialchars</title>
328
-
<programlisting role="php">
329
-
<![CDATA[
330
-
filter.default = full_special_chars
331
-
filter.default_flags = 0
332
-
]]>
333
-
</programlisting>
334
-
</example>
335
-
</para>
336
-
</warning>
337
-
338
-
<simplesect role="changelog">
339
-
&reftitle.changelog;
340
-
<para>
341
-
<informaltable>
342
-
<tgroup cols="2">
343
-
<thead>
344
-
<row>
345
-
<entry>&Version;</entry>
346
-
<entry>&Description;</entry>
347
-
</row>
348
-
</thead>
349
-
<tbody>
350
-
<row>
351
-
<entry>5.2.11/5.3.1</entry>
352
-
<entry>
353
-
Slashes (<literal>/</literal>) are removed by
354
-
<constant>FILTER_SANITIZE_EMAIL</constant>. Prior they were retained.
355
-
</entry>
356
-
</row>
357
-
</tbody>
358
-
</tgroup>
359
-
</informaltable>
360
-
</para>
361
-
</simplesect>
362
-

363
-
</section>
364
-
<!--}}}-->
365
-

366
-
<!-- Other filters: {{{-->
367
-
<section xml:id="filter.filters.misc">
368
-
<title>Other filters</title>
369
-
<para>
370
-
<table>
371
-
<title>List of miscellaneous filters</title>
372
-
<tgroup cols="5">
373
-
<thead>
374
-
<row>
375
-
<entry>ID</entry>
376
-
<entry>Name</entry>
377
-
<entry>Options</entry>
378
-
<entry>Flags</entry>
379
-
<entry>Description</entry>
380
-
</row>
381
-
</thead>
382
-
<tbody>
383
-
<row>
384
-
<entry><constant>FILTER_CALLBACK</constant></entry>
385
-
<entry>"callback"</entry>
386
-
<entry><type>callable</type> function or method</entry>
387
-
<entry></entry>
388
-
<entry>Call user-defined function to filter data.</entry>
389
-
</row>
390
-
</tbody>
391
-
</tgroup>
392
-
</table>
393
-
</para>
394
-
</section>
395
-
<!--}}}-->
396
-

397
-
<!-- Filter flags: {{{-->
398
-
<section xml:id="filter.filters.flags">
399
-
<title>Filter flags</title>
400
-
401
-
<para>
402
-
<table>
403
-
<title>List of filter flags</title>
404
-
<tgroup cols="3">
405
-
<thead>
406
-
<row>
407
-
<entry>ID</entry>
408
-
<entry>Used with</entry>
409
-
<entry>Description</entry>
410
-
</row>
411
-
</thead>
412
-
<tbody>
413
-
<row>
414
-
<entry><constant>FILTER_FLAG_STRIP_LOW</constant></entry>
415
-
<entry>
416
-
<constant>FILTER_SANITIZE_ENCODED</constant>,
417
-
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
418
-
<constant>FILTER_SANITIZE_STRING</constant>,
419
-
<constant>FILTER_UNSAFE_RAW</constant>
420
-
</entry>
421
-
<entry>
422
-
Strips characters that have a numerical value &lt;32.
423
-
</entry>
424
-
</row>
425
-
<row>
426
-
<entry><constant>FILTER_FLAG_STRIP_HIGH</constant></entry>
427
-
<entry>
428
-
<constant>FILTER_SANITIZE_ENCODED</constant>,
429
-
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
430
-
<constant>FILTER_SANITIZE_STRING</constant>,
431
-
<constant>FILTER_UNSAFE_RAW</constant>
432
-
</entry>
433
-
<entry>
434
-
Strips characters that have a numerical value &gt;127.
435
-
</entry>
436
-
</row>
437
-
<row>
438
-
<entry><constant>FILTER_FLAG_ALLOW_FRACTION</constant></entry>
439
-
<entry>
440
-
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>
441
-
</entry>
442
-
<entry>
443
-
Allows a period (<literal>.</literal>) as a fractional separator in
444
-
numbers.
445
-
</entry>
446
-
</row>
447
-
<row>
448
-
<entry><constant>FILTER_FLAG_ALLOW_THOUSAND</constant></entry>
449
-
<entry>
450
-
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>,
451
-
<constant>FILTER_VALIDATE_FLOAT</constant>
452
-
</entry>
453
-
<entry>
454
-
Allows a comma (<literal>,</literal>) as a thousands separator in
455
-
numbers.
456
-
</entry>
457
-
</row>
458
-
<row>
459
-
<entry><constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant></entry>
460
-
<entry>
461
-
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>
462
-
</entry>
463
-
<entry>
464
-
Allows an <literal>e</literal> or <literal>E</literal> for scientific
465
-
notation in numbers.
466
-
</entry>
467
-
</row>
468
-
<row>
469
-
<entry><constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant></entry>
470
-
<entry>
471
-
<constant>FILTER_SANITIZE_STRING</constant>
472
-
</entry>
473
-
<entry>
474
-
If this flag is present, single (<literal>'</literal>) and double
475
-
(<literal>"</literal>) quotes will not be encoded.
476
-
</entry>
477
-
</row>
478
-
<row>
479
-
<entry><constant>FILTER_FLAG_ENCODE_LOW</constant></entry>
480
-
<entry>
481
-
<constant>FILTER_SANITIZE_ENCODED</constant>,
482
-
<constant>FILTER_SANITIZE_STRING</constant>,
483
-
<constant>FILTER_SANITIZE_RAW</constant>
484
-
</entry>
485
-
<entry>
486
-
Encodes all characters with a numerical value &lt;32.
487
-
</entry>
488
-
</row>
489
-
<row>
490
-
<entry><constant>FILTER_FLAG_ENCODE_HIGH</constant></entry>
491
-
<entry>
492
-
<constant>FILTER_SANITIZE_ENCODED</constant>,
493
-
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
494
-
<constant>FILTER_SANITIZE_STRING</constant>,
495
-
<constant>FILTER_SANITIZE_RAW</constant>
496
-
</entry>
497
-
<entry>
498
-
Encodes all characters with a numerical value &gt;127.
499
-
</entry>
500
-
</row>
501
-
<row>
502
-
<entry><constant>FILTER_FLAG_ENCODE_AMP</constant></entry>
503
-
<entry>
504
-
<constant>FILTER_SANITIZE_STRING</constant>,
505
-
<constant>FILTER_SANITIZE_RAW</constant>
506
-
</entry>
507
-
<entry>
508
-
Encodes ampersands (<literal>&amp;</literal>).
509
-
</entry>
510
-
</row>
511
-
<row>
512
-
<entry><constant>FILTER_NULL_ON_FAILURE</constant></entry>
513
-
<entry>
514
-
<constant>FILTER_VALIDATE_BOOLEAN</constant>
515
-
</entry>
516
-
<entry>
517
-
Returns &null; for unrecognized boolean values.
518
-
</entry>
519
-
</row>
520
-
<row>
521
-
<entry><constant>FILTER_FLAG_ALLOW_OCTAL</constant></entry>
522
-
<entry>
523
-
<constant>FILTER_VALIDATE_INT</constant>
524
-
</entry>
525
-
<entry>
526
-
Regards inputs starting with a zero (<literal>0</literal>) as octal
527
-
numbers. This only allows the succeeding digits to be
528
-
<literal>0-7</literal>.
529
-
</entry>
530
-
</row>
531
-
<row>
532
-
<entry><constant>FILTER_FLAG_ALLOW_HEX</constant></entry>
533
-
<entry>
534
-
<constant>FILTER_VALIDATE_INT</constant>
535
-
</entry>
536
-
<entry>
537
-
Regards inputs starting with <literal>0x</literal> or
538
-
<literal>0X</literal> as hexadecimal numbers. This only allows
539
-
succeeding characters to be <literal>a-fA-F0-9</literal>.
540
-
</entry>
541
-
</row>
542
-
<row>
543
-
<entry><constant>FILTER_FLAG_IPV4</constant></entry>
544
-
<entry>
545
-
<constant>FILTER_VALIDATE_IP</constant>
546
-
</entry>
547
-
<entry>
548
-
Allows the IP address to be in IPv4 format.
549
-
</entry>
550
-
</row>
551
-
<row>
552
-
<entry><constant>FILTER_FLAG_IPV6</constant></entry>
553
-
<entry>
554
-
<constant>FILTER_VALIDATE_IP</constant>
555
-
</entry>
556
-
<entry>
557
-
Allows the IP address to be in IPv6 format.
558
-
</entry>
559
-
</row>
560
-
<row>
561
-
<entry><constant>FILTER_FLAG_NO_PRIV_RANGE</constant></entry>
562
-
<entry>
563
-
<constant>FILTER_VALIDATE_IP</constant>
564
-
</entry>
565
-
<entry>
566
-
<para>
567
-
Fails validation for the following private IPv4 ranges:
568
-
<literal>10.0.0.0/8</literal>, <literal>172.16.0.0/12</literal> and
569
-
<literal>192.168.0.0/16</literal>.
570
-
</para>
571
-
<para>
572
-
Fails validation for the IPv6 addresses starting with
573
-
<literal>FD</literal> or <literal>FC</literal>.
574
-
</para>
575
-
</entry>
576
-
</row>
577
-
<row>
578
-
<entry><constant>FILTER_FLAG_NO_RES_RANGE</constant></entry>
579
-
<entry>
580
-
<constant>FILTER_VALIDATE_IP</constant>
581
-
</entry>
582
-
<entry>
583
-
Fails validation for the following reserved IPv4 ranges:
584
-
<literal>0.0.0.0/8</literal>, <literal>169.254.0.0/16</literal>,
585
-
<literal>192.0.2.0/24</literal> and <literal>224.0.0.0/4</literal>.
586
-
This flag does not apply to IPv6 addresses.
587
-
</entry>
588
-
</row>
589
-
<row>
590
-
<entry><constant>FILTER_FLAG_PATH_REQUIRED</constant></entry>
591
-
<entry>
592
-
<constant>FILTER_VALIDATE_URL</constant>
593
-
</entry>
594
-
<entry>
595
-
Requires the <acronym>URL</acronym> to contain a path part.
596
-
</entry>
597
-
</row>
598
-
<row>
599
-
<entry><constant>FILTER_FLAG_QUERY_REQUIRED</constant></entry>
600
-
<entry>
601
-
<constant>FILTER_VALIDATE_URL</constant>
602
-
</entry>
603
-
<entry>
604
-
Requires the <acronym>URL</acronym> to contain a query string.
605
-
</entry>
606
-
</row>
607
-
<row>
608
-
<entry><constant>FILTER_REQUIRE_SCALAR</constant></entry>
609
-
<entry>
610
-
</entry>
611
-
<entry>
612
-
Requires the value to be scalar.
613
-
</entry>
614
-
</row>
615
-
<row>
616
-
<entry><constant>FILTER_REQUIRE_ARRAY</constant></entry>
617
-
<entry>
618
-
</entry>
619
-
<entry>
620
-
Requires the value to be an array.
621
-
</entry>
622
-
</row>
623
-
<row>
624
-
<entry><constant>FILTER_FORCE_ARRAY</constant></entry>
625
-
<entry>
626
-
</entry>
627
-
<entry>
628
-
If the value is a scalar, it is treated as array with the scalar value
629
-
as only element.
630
-
</entry>
631
-
</row>
632
-
</tbody>
633
-
</tgroup>
634
-
</table>
635
-
</para>
636
-
</section>
637
-
<!--}}}-->
638
-
</chapter>
639
-

640
-
<!-- Keep this comment at the end of the file
641
-
Local variables:
642
-
mode: sgml
643
-
sgml-omittag:t
644
-
sgml-shorttag:t
645
-
sgml-minimize-attributes:nil
646
-
sgml-always-quote-attributes:t
647
-
sgml-indent-step:1
648
-
sgml-indent-data:t
649
-
indent-tabs-mode:nil
650
-
sgml-parent-document:nil
651
-
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
652
-
sgml-exposed-tags:nil
653
-
sgml-local-catalogs:nil
654
-
sgml-local-ecat-files:nil
655
-
End:
656
-
vim600: syn=xml fen fdm=marker fdl=2 si
657
-
vim: et tw=78 syn=sgml
658
-
vi: ts=1 sw=1
659
-
-->
660
0