1--TEST--
2Bug #79441 Segfault in mb_chr() if internal encoding is unsupported
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
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