Annotation of embedaddon/php/ext/xml/tests/bug49687.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #49687 Several utf8_decode deficiencies and vulnerabilities
3: --SKIPIF--
4: <?php
5: require_once("skipif.inc");
6: if (!extension_loaded('xml')) die ("skip xml extension not available");
7: ?>
8: --FILE--
9: <?php
10:
11: $tests = array(
12: "\x41\xC2\x3E\x42",
13: "\xE3\x80\x22",
14: "\x41\x98\xBA\x42\xE2\x98\x43\xE2\x98\xBA\xE2\x98",
15: );
16: foreach ($tests as $t) {
17: echo bin2hex(utf8_decode($t)), "\n";
18: }
19: echo "Done.\n";
20: --EXPECT--
21: 413f3e42
22: 3f22
23: 413f3f423f433f3f
24: Done.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>