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