xref: /PHP-8.1/ext/mbstring/tests/bug79441.phpt (revision 39131219)
1--TEST--
2Bug #79441 Segfault in mb_chr() if internal encoding is unsupported
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7
8mb_internal_encoding("utf-7");
9try {
10    mb_chr(0xd800);
11} catch (\ValueError $e) {
12    echo $e->getMessage() . \PHP_EOL;
13}
14
15?>
16--EXPECT--
17mb_chr() does not support the "UTF-7" encoding
18