php-src/ext/mbstring/tests/mb_encode_numericentity_large_ints.phpt
Gina Peter Banyard 7684a3d138
ext/mbstring: move unsigned 32 bit integer tests to a new test (#12891)
And only run it on 64 bit architectures as those are floats on 32 bit.
2023-12-07 20:19:11 +00:00

16 lines
474 B
PHP

--TEST--
mb_encode_numericentity() with 0xFFFFFFFF in conversion map
--EXTENSIONS--
mbstring
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php
// Regression test; the old implementation could only emit hexadecimal entities with about 5 digits
$convmap = [0xffffffff, 0xffffffff, 0x540a0af7, 0x5a485054];
echo "13: " . mb_encode_numericentity("\xFF", $convmap, "ASCII", true) . "\n";
?>
--EXPECT--
13: &#x50080054;