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