php-src/ext/mbstring/tests/mb_encode_numericentity_references.phpt
Niels Dossche 2b383848a7
Fix handling of references in zval_try_get_long()
This API can't handle references, yet everyone keeps forgetting that it
can't and that you should DEREF upfront. Fix every type of this issue
once and for all by moving the reference handling to this Zend API.

Closes GH-18761.
2025-06-04 21:00:05 +02:00

12 lines
226 B
PHP

--TEST--
mb_encode_numericentity() reference handling
--EXTENSIONS--
mbstring
--FILE--
<?php
$n = 0;
$convmap = [&$n, 0x1FFFFF, 0, 0x10FFFF];
var_dump(mb_encode_numericentity("", $convmap, "utf8"));
?>
--EXPECT--
string(0) ""