1--TEST--
2mb_encode_numericentity() map errors
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7try {
8    $convmap = array(0xFF, 0x2FFFF, 0); // 3 elements
9    echo mb_encode_numericentity('str', $convmap, "UTF-8") . "\n";
10} catch (ValueError $ex) {
11    echo $ex->getMessage(), "\n";
12}
13try {
14    $convmap = array(0xFF, "not an int", 0, 0); // 3 elements
15    echo mb_encode_numericentity('str', $convmap, "UTF-8") . "\n";
16} catch (ValueError $ex) {
17    echo $ex->getMessage(), "\n";
18}
19
20?>
21--EXPECT--
22mb_encode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements
23mb_encode_numericentity(): Argument #2 ($map) must only be composed of values of type int
24