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/*
16 * Test basic functionality of mb_internal_encoding
17 */
18
19echo "*** Testing mb_internal_encoding() : basic functionality ***\n";
20
21var_dump(ini_get('default_charset'));
22var_dump(ini_get('input_encoding'));
23var_dump(ini_get('output_encoding'));
24var_dump(ini_get('internal_encoding'));
25var_dump(ini_get('mbstring.http_input'));
26var_dump(ini_get('mbstring.http_output'));
27var_dump(ini_get('mbstring.internal_encoding'));
28
29var_dump(mb_internal_encoding());   //default internal encoding
30var_dump(mb_internal_encoding('UTF-8'));    //change internal encoding to UTF-8
31var_dump(mb_internal_encoding());    //check internal encoding is now set to UTF-8
32
33echo "Done";
34?>
35--EXPECT--
36*** Testing mb_internal_encoding() : basic functionality ***
37string(0) ""
38string(10) "ISO-8859-1"
39string(10) "ISO-8859-1"
40string(10) "ISO-8859-1"
41string(0) ""
42string(0) ""
43string(0) ""
44string(10) "ISO-8859-1"
45bool(true)
46string(5) "UTF-8"
47Done
48