Lines Matching refs:mb_encode_numericentity

2 Test mb_encode_numericentity() function: Convert text to HTML entities
10 echo "1: " . mb_encode_numericentity($str1, $convmap, "UTF-8") . "\n";
11 echo "1 (hex): " . mb_encode_numericentity($str1, $convmap, "UTF-8", true) . "\n";
12 echo "2: " . mb_encode_numericentity($str2, $convmap, "UTF-8") . "\n";
15 echo "3: " . mb_encode_numericentity('aŒbœcŠdše€fg', $convmap, "UTF-8") . "\n";
18 echo "4: " . mb_encode_numericentity('föo', $convmap, "UTF-8") . "\n";
22 echo "5: " . mb_encode_numericentity('aŒbœcŠdše€fg', $convmap, "UTF-8") . "\n";
28 echo "6: " . mb_encode_numericentity("\x00", array(0, 1, 0, 0xFFFF), "UTF-8", false) . "\n";
29 echo "6 (hex): " . mb_encode_numericentity("\x00", array(0, 1, 0, 0xFFFF), "UTF-8", true) . "\n";
36 echo "7: " . mb_encode_numericentity('föo', $convmap, "UTF-8") . "\n";
37 echo "7 (hex): " . mb_encode_numericentity('föo', $convmap, "UTF-8", true) . "\n";
41 echo "8: " . mb_encode_numericentity("\x01\x02\x03", $convmap, "UTF-8") . "\n";
42 echo "8 (hex): " . mb_encode_numericentity("\x01\x02\x03", $convmap, "UTF-8", true) . "\n";
46 echo "9: " . mb_encode_numericentity("\x01\x02\x03", $convmap, "UTF-8") . "\n";
47 echo "9 (hex): " . mb_encode_numericentity("\x01\x02\x03", $convmap, "UTF-8", true) . "\n";
51 echo "10: " . mb_encode_numericentity('föo', $convmap, "UTF-8") . "\n";
52 echo "10 (hex): " . mb_encode_numericentity('föo', $convmap, "UTF-8", true) . "\n";
57 echo "11: " . mb_encode_numericentity($iso2022jp, $convmap, "ISO-2022-JP") . "\n";
58 echo "11 (hex): " . mb_encode_numericentity($iso2022jp, $convmap, "ISO-2022-JP", true) . "\n";
62 echo "12: " . mb_encode_numericentity("m", $convmap, "ASCII") . "\n";
66 echo "13: " . mb_encode_numericentity("\xFF", $convmap, "ASCII", true) . "\n";
75 5: mb_encode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements