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