1--TEST--
2Encoding INI test
3--SKIPIF--
4<?php extension_loaded('iconv') or die('skip mbstring not available'); ?>
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--EXPECT--
45Getting INI
46string(10) "ISO-8859-1"
47string(0) ""
48string(0) ""
49string(0) ""
50string(10) "ISO-8859-1"
51string(0) ""
52string(0) ""
53Setting INI
54string(10) "ISO-8859-1"
55string(0) ""
56string(0) ""
57string(0) ""
58string(10) "ISO-8859-1"
59string(0) ""
60string(0) ""
61Getting INI
62string(5) "UTF-8"
63string(5) "UTF-8"
64string(5) "UTF-8"
65string(5) "UTF-8"
66string(5) "UTF-8"
67string(5) "UTF-8"
68string(5) "UTF-8"
69