mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
26 lines
817 B
PHP
26 lines
817 B
PHP
--TEST--
|
|
Bug #40685 (mb_decode_numericentity() removes '&' in the string)
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--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'));
|
|
?>
|
|
--EXPECTF--
|
|
string(1) "&"
|
|
string(3) "&&&"
|
|
string(2) "&#"
|
|
string(3) "&#x"
|
|
string(4) "="
|
|
string(5) "="
|
|
string(1) "="
|
|
string(1) "="
|