1--TEST-- 2Test mb_strtolower() function : error conditions - pass an unknown encoding 3--EXTENSIONS-- 4mbstring 5--FILE-- 6<?php 7/* 8 * Pass an unknown encoding to mb_strtolower() to test behaviour 9 */ 10 11echo "*** Testing mb_strtolower() : error conditions***\n"; 12 13$sourcestring = 'hello, world'; 14$encoding = 'unknown-encoding'; 15 16try { 17 var_dump( mb_strtolower($sourcestring, $encoding) ); 18} catch (\ValueError $e) { 19 echo $e->getMessage() . \PHP_EOL; 20} 21 22?> 23--EXPECT-- 24*** Testing mb_strtolower() : error conditions*** 25mb_strtolower(): Argument #2 ($encoding) must be a valid encoding, "unknown-encoding" given 26