1--TEST-- 2Test mb_internal_encoding() function : basic functionality 3--INI-- 4default_charset="" 5input_encoding="ISO-8859-1" 6output_encoding="ISO-8859-1" 7internal_encoding="ISO-8859-1" 8--SKIPIF-- 9<?php 10extension_loaded('mbstring') or die('skip'); 11function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build"); 12?> 13--FILE-- 14<?php 15/* Prototype : string mb_internal_encoding([string $encoding]) 16 * Description: Sets the current internal encoding or Returns 17 * the current internal encoding as a string 18 * Source code: ext/mbstring/mbstring.c 19 */ 20 21/* 22 * Test basic functionality of mb_internal_encoding 23 */ 24 25echo "*** Testing mb_internal_encoding() : basic functionality ***\n"; 26 27var_dump(ini_get('default_charset')); 28var_dump(ini_get('input_encoding')); 29var_dump(ini_get('output_encoding')); 30var_dump(ini_get('internal_encoding')); 31var_dump(ini_get('mbstring.http_input')); 32var_dump(ini_get('mbstring.http_output')); 33var_dump(ini_get('mbstring.internal_encoding')); 34 35var_dump(mb_internal_encoding()); //default internal encoding 36var_dump(mb_internal_encoding('UTF-8')); //change internal encoding to UTF-8 37var_dump(mb_internal_encoding()); //check internal encoding is now set to UTF-8 38 39echo "Done"; 40?> 41--EXPECTF-- 42*** Testing mb_internal_encoding() : basic functionality *** 43string(0) "" 44string(10) "ISO-8859-1" 45string(10) "ISO-8859-1" 46string(10) "ISO-8859-1" 47string(0) "" 48string(0) "" 49string(0) "" 50string(5) "UTF-8" 51bool(true) 52string(5) "UTF-8" 53Done 54