xref: /PHP-5.3/ext/mbstring/tests/bug40685.phpt (revision 3d888412)
1--TEST--
2Bug #40685 (mb_decode_numericentity() removes '&' in the string)
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5--FILE--
6<?php
7$map = array(0, 0x10FFFF, 0, 0xFFFFFF);
8var_dump(mb_decode_numericentity('&', $map, 'UTF-8'));
9var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8'));
10var_dump(mb_decode_numericentity('&#', $map, 'UTF-8'));
11var_dump(mb_decode_numericentity('&#61', $map, 'UTF-8'));
12var_dump(mb_decode_numericentity('&#61;', $map, 'UTF-8'));
13?>
14--EXPECTF--
15string(1) "&"
16string(3) "&&&"
17string(2) "&#"
18string(4) "&#61"
19string(1) "="
20
21