Annotation of embedaddon/php/ext/standard/tests/strings/htmlentities18.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: htmlentities() / htmlspecialchars() "don't double encode" flag support
3: --FILE--
4: <?php
5: $tests = array(
6: "abc",
7: "abc&sfdsa",
8: "test+s & some more D",
9: "test+s & some more D",
10: "&; & &#a; &9; &#xyz;",
11: "&kffjadfdhsjfhjasdhffasdfas;",
12: "�",
13: "&",
14: "&&&",
15: "&ab&&",
16: );
17:
18: foreach ($tests as $test) {
19: var_dump(htmlentities($test, ENT_QUOTES, NULL, FALSE));
20: var_dump(htmlspecialchars($test, ENT_QUOTES, NULL, FALSE));
21: }
22: ?>
23: --EXPECT--
24: string(3) "abc"
25: string(3) "abc"
26: string(13) "abc&sfdsa"
27: string(13) "abc&sfdsa"
28: string(33) "test+s & some more D"
29: string(33) "test+s & some more D"
30: string(34) "test+s & some more D"
31: string(34) "test+s & some more D"
1.1.1.2 ! misho 32: string(43) "&; &amp &#a; &9; &#xyz;"
! 33: string(43) "&; &amp &#a; &9; &#xyz;"
1.1 misho 34: string(32) "&kffjadfdhsjfhjasdhffasdfas;"
35: string(32) "&kffjadfdhsjfhjasdhffasdfas;"
36: string(16) "&#8787978789"
37: string(16) "&#8787978789"
38: string(5) "&"
39: string(5) "&"
40: string(15) "&&&"
41: string(15) "&&&"
42: string(17) "&ab&&"
43: string(17) "&ab&&"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>