1--TEST--
2Encoding INI test
3--EXTENSIONS--
4iconv
5--INI--
6error_reporting=E_ALL & ~E_DEPRECATED
7default_charset=ISO-8859-1
8internal_encoding=
9input_encoding=
10output_encoding=
11iconv.internal_encoding=ISO-8859-1
12iconv.http_input=ISO-8859-1
13iconv.http_output=ISO-8859-1
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('iconv.internal_encoding'));
23var_dump(ini_get('iconv.input_encoding'));
24var_dump(ini_get('iconv.output_encoding'));
25
26echo "Setting INI\n";
27var_dump(ini_set('default_charset', 'UTF-8'));
28var_dump(ini_set('internal_encoding', 'UTF-8'));
29var_dump(ini_set('input_encoding', 'UTF-8'));
30var_dump(ini_set('output_encoding', 'UTF-8'));
31var_dump(ini_set('iconv.internal_encoding', 'UTF-8'));
32var_dump(ini_set('iconv.input_encoding', 'UTF-8'));
33var_dump(ini_set('iconv.output_encoding', 'UTF-8'));
34
35echo "Getting INI\n";
36var_dump(ini_get('default_charset'));
37var_dump(ini_get('internal_encoding'));
38var_dump(ini_get('input_encoding'));
39var_dump(ini_get('output_encoding'));
40
41var_dump(ini_get('iconv.internal_encoding'));
42var_dump(ini_get('iconv.input_encoding'));
43var_dump(ini_get('iconv.output_encoding'));
44?>
45--EXPECT--
46Getting INI
47string(10) "ISO-8859-1"
48string(0) ""
49string(0) ""
50string(0) ""
51string(10) "ISO-8859-1"
52string(0) ""
53string(0) ""
54Setting INI
55string(10) "ISO-8859-1"
56string(0) ""
57string(0) ""
58string(0) ""
59string(10) "ISO-8859-1"
60string(0) ""
61string(0) ""
62Getting INI
63string(5) "UTF-8"
64string(5) "UTF-8"
65string(5) "UTF-8"
66string(5) "UTF-8"
67string(5) "UTF-8"
68string(5) "UTF-8"
69string(5) "UTF-8"
70