summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/bug79441.phpt
blob: 9297493a6eaf753705307b055071eef11391bf77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #79441 Segfault in mb_chr() if internal encoding is unsupported
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php

mb_internal_encoding("utf-7");
try {
    mb_chr(0xd800);
} catch (\ValueError $e) {
    echo $e->getMessage() . \PHP_EOL;
}

?>
--EXPECT--
mb_chr() does not support the "UTF-7" encoding