--TEST-- Test mb_decode_numericentity() function : Convert HTML entities to text --EXTENSIONS-- mbstring --FILE-- getMessage()."\n"; } echo "15: " . bin2hex(mb_decode_numericentity('�', [0, 1, 0, 0xFFFF], 'UTF-8')) . "\n"; echo "16: " . bin2hex(mb_decode_numericentity('�', [0, 1, 0, 0xFFFF], 'UTF-8')) . "\n"; // Weird convmap $convmap = [ 0, 0, 0, 0, // Only one codepoint, empty mask 100, 50, 0, 0xFFFF // 'End' codepoint is before 'start' codepoint ]; echo "17: " . mb_decode_numericentity('föo', $convmap, "UTF-8") . "\n"; // Convmap with positive offset $convmap = [0, 10, 1000, 0xFFFF]; echo "18: " . bin2hex(mb_decode_numericentity("ϩϪϫ", $convmap, "UTF-8")) . "\n"; echo "19: " . bin2hex(mb_decode_numericentity("ϩϪϫ", $convmap, "UTF-8")) . "\n"; echo "20: " . mb_decode_numericentity("{a;", [0, 0xFFFF, 0, 0xFFFF]) . "\n"; ?> --EXPECT-- 1: ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ 2: ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦ 3: aŒbœcŠdše€fg 4: � 5: � 6: � 7: � 8: � 9: � 10: � 11: � 12: 00bc614e 13: föo 14: mb_decode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements 15: 00 16: 00 17: föo 18: 010203 19: 010203 20: {a;