1--TEST-- 2Bug #76704 (mb_detect_order return value varies based on argument type) 3--SKIPIF-- 4<?php 5if (!extension_loaded('mbstring')) die('skip mbstring extension not available'); 6?> 7--FILE-- 8<?php 9try { 10 var_dump(mb_detect_order('Foo, UTF-8')); 11} catch (\ValueError $e) { 12 echo $e->getMessage() . \PHP_EOL; 13} 14try { 15 var_dump(mb_detect_order(['Foo', 'UTF-8'])); 16} catch (\ValueError $e) { 17 echo $e->getMessage() . \PHP_EOL; 18} 19?> 20--EXPECT-- 21mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "Foo" 22mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "Foo" 23