1--TEST--
2Encoding INI test
3--EXTENSIONS--
4mbstring
5--INI--
6error_reporting=E_ALL & ~E_DEPRECATED
7default_charset=Shift_JIS
8internal_encoding=
9input_encoding=
10output_encoding=
11mbstring.internal_encoding=Shift_JIS
12mbstring.http_input=Shift_JIS
13mbstring.http_output=Shift_JIS
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(9) "Shift_JIS"
50string(0) ""
51string(0) ""
52string(0) ""
53string(9) "Shift_JIS"
54string(4) "SJIS"
55string(9) "Shift_JIS"
56string(9) "Shift_JIS"
57Setting INI
58string(9) "Shift_JIS"
59string(0) ""
60string(0) ""
61string(0) ""
62string(9) "Shift_JIS"
63string(9) "Shift_JIS"
64string(9) "Shift_JIS"
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