xref: /PHP-5.3/ext/mbstring/tests/bug48697.phpt (revision 6a040241)
1--TEST--
2Bug #48697 (mb_internal_encoding() value gets reset by parse_str() or mb_parse_str()
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5--FILE--
6<?php
7ini_set('mbstring.internal_encoding', 'ISO-8859-15');
8ini_set('mbstring.encoding_translation', true);
9var_dump(mb_internal_encoding());
10mb_internal_encoding('UTF-8');
11var_dump(mb_internal_encoding());
12parse_str('a=b');
13var_dump(mb_internal_encoding());
14mb_internal_encoding('UTF-8');
15var_dump(mb_internal_encoding());
16parse_str('a=b');
17var_dump(mb_internal_encoding());
18?>
19--EXPECT--
20string(11) "ISO-8859-15"
21string(5) "UTF-8"
22string(5) "UTF-8"
23string(5) "UTF-8"
24string(5) "UTF-8"
25