xref: /php-src/ext/filter/tests/026.phpt (revision bf94010b)
1--TEST--
2filter_var() and FILTER_SANITIZE_STRIPPED
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7
8var_dump(filter_var("<p>Let me <font color=\"#000000\">see</font> you <br /><b>Stripped</b> down to the bone</p>", FILTER_SANITIZE_STRIPPED));
9var_dump(filter_var("!@#$%^&*()><<>+_\"'<br><p /><li />", FILTER_SANITIZE_STRIPPED));
10var_dump(filter_var("", FILTER_SANITIZE_STRIPPED));
11
12var_dump(filter_var("<p>Let me <font color=\"#000000\">see</font> you <br /><b>Stripped</b> down to the bone</p>", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_LOW));
13var_dump(filter_var("!@#$%^&*()><<>+_\"'<br><p /><li />", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_LOW));
14var_dump(filter_var("", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_LOW));
15
16var_dump(filter_var("<p>Let me <font color=\"#000000\">see</font> you <br /><b>Stripped</b> down to the bone</p>", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_HIGH));
17var_dump(filter_var("!@#$%^&*()><<>+_\"'<br><p /><li />", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_HIGH));
18var_dump(filter_var("", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_HIGH));
19
20echo "Done\n";
21?>
22--EXPECTF--
23Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
24string(40) "Let me see you Stripped down to the bone"
25
26Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
27string(11) "!@#$%^&*()>"
28
29Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
30string(0) ""
31
32Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
33string(40) "Let me see you Stripped down to the bone"
34
35Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
36string(11) "!@#$%^&*()>"
37
38Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
39string(0) ""
40
41Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
42string(40) "Let me see you Stripped down to the bone"
43
44Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
45string(11) "!@#$%^&*()>"
46
47Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated in %s on line %d
48string(0) ""
49Done
50