1--TEST-- 2Encoding INI test 3--SKIPIF-- 4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> 5--INI-- 6error_reporting=E_ALL & ~E_DEPRECATED 7default_charset= 8internal_encoding=EUC-JP 9input_encoding= 10output_encoding= 11mbstring.internal_encoding= 12mbstring.http_input= 13mbstring.http_output= 14--FILE-- 15<?php 16echo "Getting INI\n"; 17var_dump(ini_get('default_charset')); 18var_dump(ini_get('internal_encoding')); 19var_dump(ini_get('input_encoding')); 20var_dump(ini_get('output_encoding')); 21 22var_dump(ini_get('mbstring.internal_encoding')); 23var_dump(mb_internal_encoding()); 24var_dump(ini_get('mbstring.http_input')); 25var_dump(ini_get('mbstring.http_output')); 26 27echo "Setting INI\n"; 28var_dump(ini_set('default_charset', 'UTF-8')); 29var_dump(ini_set('internal_encoding', 'UTF-8')); 30var_dump(ini_set('input_encoding', 'UTF-8')); 31var_dump(ini_set('output_encoding', 'UTF-8')); 32var_dump(ini_set('mbstring.internal_encoding', 'UTF-8')); 33var_dump(ini_set('mbstring.http_input', 'UTF-8')); 34var_dump(ini_set('mbstring.http_output', 'UTF-8')); 35 36echo "Getting INI\n"; 37var_dump(ini_get('default_charset')); 38var_dump(ini_get('internal_encoding')); 39var_dump(ini_get('input_encoding')); 40var_dump(ini_get('output_encoding')); 41 42var_dump(ini_get('mbstring.internal_encoding')); 43var_dump(mb_internal_encoding()); 44var_dump(ini_get('mbstring.http_input')); 45var_dump(ini_get('mbstring.http_output')); 46?> 47--EXPECT-- 48Getting INI 49string(0) "" 50string(6) "EUC-JP" 51string(0) "" 52string(0) "" 53string(0) "" 54string(6) "EUC-JP" 55string(0) "" 56string(0) "" 57Setting INI 58string(0) "" 59string(6) "EUC-JP" 60string(0) "" 61string(0) "" 62string(0) "" 63string(0) "" 64string(0) "" 65Getting INI 66string(5) "UTF-8" 67string(5) "UTF-8" 68string(5) "UTF-8" 69string(5) "UTF-8" 70string(5) "UTF-8" 71string(5) "UTF-8" 72string(5) "UTF-8" 73string(5) "UTF-8" 74