1--TEST-- 2Test mb_internal_encoding() function : basic functionality 3--SKIPIF-- 4<?php 5extension_loaded('mbstring') or die('skip'); 6function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build"); 7?> 8--FILE-- 9<?php 10/* Prototype : string mb_internal_encoding([string $encoding]) 11 * Description: Sets the current internal encoding or Returns 12 * the current internal encoding as a string 13 * Source code: ext/mbstring/mbstring.c 14 */ 15 16/* 17 * Test basic functionality of mb_internal_encoding 18 */ 19 20echo "*** Testing mb_internal_encoding() : basic functionality ***\n"; 21 22var_dump(mb_internal_encoding()); //default internal encoding 23 24var_dump(mb_internal_encoding('UTF-8')); //change internal encoding to UTF-8 25 26var_dump(mb_internal_encoding()); //check internal encoding is now set to UTF-8 27 28 29echo "Done"; 30?> 31--EXPECTF-- 32*** Testing mb_internal_encoding() : basic functionality *** 33string(%d) "%s" 34bool(true) 35string(5) "UTF-8" 36Done 37