<?php
// the following documentation depending on understanding of the code source of php mbr
// first in order to optimise the work of php
// the string must contain "&" or else php won't bother trying to decode.
// for the map : int start_codeN, int end_codeN, int offsetN, int maskN
// the entity must be in the range [start_codeN, end_codeN] , if the entity is greater or less
// mb_decode_numericentity will ignore the decode process and return the $string as it is.
// in the late version of php, $map : "must have a multiple of 4 elements"
$map = [ 0x0, 0xFFFF, 0, 0];
echo mb_decode_numericentity('m', $map ); // result "m"
// if offsetN = 1 result "l" ; the more you increase the decimal the more it use OR operrand.
$map_2 = [ 0x0, 0xFFFF, 60, 0];
echo mb_decode_numericentity('m', $map_2 ); // decode ( 1 ) result : "1"
// entity Reference to check the result : https://cs.stanford.edu/people/miles/iso8859.html#ISO
?>