Lines Matching refs:mb_decode_numericentity
2 Test mb_decode_numericentity() function : Convert HTML entities to text
16 $result = mb_decode_numericentity($str, $convmap, $encoding);
25 $result = mb_decode_numericentity($str, $convmap, $encoding);
39 echo "1: " . mb_decode_numericentity($str1, $convmap, "UTF-8") . "\n";
40 echo "2: " . mb_decode_numericentity($str2, $convmap, "UTF-8") . "\n";
41 echo "3: " . mb_decode_numericentity($str3, $convmap, "UTF-8") . "\n";
44 echo "4: " . mb_decode_numericentity('�', $convmap), "\n"; // Entity is too big
45 echo "5: " . mb_decode_numericentity('�', $convmap), "\n"; // Entity is too big
46 echo "6: " . mb_decode_numericentity('�', $convmap), "\n"; // Too many digits
47 echo "7: " . mb_decode_numericentity('�', $convmap), "\n"; // Too many digits
48 echo "8: " . mb_decode_numericentity('�', $convmap), "\n"; // Too many digits
49 echo "9: " . mb_decode_numericentity('�', $convmap), "\n"; // Too many digits
50 echo "10: " . bin2hex(mb_decode_numericentity('�', $convmap)), "\n"; // OK
51 echo "11: " . bin2hex(mb_decode_numericentity('�', $convmap)), "\n"; // OK
53 echo "11b: " . bin2hex(mb_decode_numericentity('�', $convmap)), "\n"; // OK
54 echo "11c: " . bin2hex(mb_decode_numericentity('�', $convmap)), "\n"; // OK
55 echo "11d: " . bin2hex(mb_decode_numericentity('𐀀', $convmap)), "\n"; // OK
56 echo "11e: " . mb_decode_numericentity('�', $convmap), "\n"; // Too many digits
59 echo "12: " . bin2hex(mb_decode_numericentity(mb_convert_encoding('�', 'UCS-4', 'ASCII'),…
62 echo "13: " . mb_decode_numericentity('föo', $convmap, "UTF-8") . "\n";
66 echo "14: " . mb_decode_numericentity($str3, $convmap, "UTF-8") . "\n";
71 echo "15: " . bin2hex(mb_decode_numericentity('�', [0, 1, 0, 0xFFFF], 'UTF-8')) . "\n";
72 echo "16: " . bin2hex(mb_decode_numericentity('�', [0, 1, 0, 0xFFFF], 'UTF-8')) . "\n";
79 echo "17: " . mb_decode_numericentity('föo', $convmap, "UTF-8") . "\n";
83 echo "18: " . bin2hex(mb_decode_numericentity("ϩϪϫ", $convmap, "UTF-8")) . "\n";
84 echo "19: " . bin2hex(mb_decode_numericentity("ϩϪϫ", $convmap, "UTF-8")) . "\n";
86 echo "20: " . mb_decode_numericentity("{a;", [0, 0xFFFF, 0, 0xFFFF]) . "\n";
124 // Originally, the new implementation of mb_decode_numericentity used -1 as a marker indicating
129 // With the legacy conversion filters, a trailing & could be truncated by mb_decode_numericentity,
138 // (mb_decode_numericentity splits its input into 'chunks' and processes it one
144 if (mb_decode_numericentity($padding . "&#ZZZ", $convmap, 'UTF-8') !== $padding . "&#ZZZ")
146 if (mb_decode_numericentity($padding . "&#xZZZ", $convmap, 'UTF-8') !== $padding . "&#xZZZ")
149 if (mb_decode_numericentity($padding . "A", $convmap, 'UTF-8') !== $padding . "A")
151 if (mb_decode_numericentity($padding . "A", $convmap, 'UTF-8') !== $padding . "A")
158 if (mb_decode_numericentity($str, $convmap, 'UTF-8') !== $str)
162 if (mb_decode_numericentity($str, $convmap, 'UTF-8') !== $str)
185 14: mb_decode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements