forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug40685.phpt
More file actions
25 lines (25 loc) · 745 Bytes
/
bug40685.phpt
File metadata and controls
25 lines (25 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #40685 (mb_decode_numericentity() removes '&' in the string)
--EXTENSIONS--
mbstring
--FILE--
<?php
$map = array(0, 0x10FFFF, 0, 0xFFFFFF);
var_dump(mb_decode_numericentity('&', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('&#', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('&#x', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('=', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('=', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('=', $map, 'UTF-8'));
var_dump(mb_decode_numericentity('=', $map, 'UTF-8'));
?>
--EXPECT--
string(1) "&"
string(3) "&&&"
string(2) "&#"
string(3) "&#x"
string(1) "="
string(1) "="
string(1) "="
string(1) "="