1--TEST--
2Test mb_detect_encoding() function : empty encoding list
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7
8$string = 'Hello';
9
10try {
11    var_dump( mb_detect_encoding($string, ''));
12} catch (\ValueError $e) {
13    echo $e->getMessage() . \PHP_EOL;
14}
15try {
16    var_dump( mb_detect_encoding($string, []));
17} catch (\ValueError $e) {
18    echo $e->getMessage() . \PHP_EOL;
19}
20
21?>
22--EXPECT--
23mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding
24mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding
25