xref: /PHP-8.2/ext/mbstring/tests/bug48697.phpt (revision 39131219)
1--TEST--
2Bug #48697 (mb_internal_encoding() value gets reset by parse_str() or mb_parse_str()
3--EXTENSIONS--
4mbstring
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', $ary);
13var_dump(mb_internal_encoding());
14mb_internal_encoding('UTF-8');
15var_dump(mb_internal_encoding());
16parse_str('a=b', $ary);
17var_dump(mb_internal_encoding());
18?>
19--EXPECTF--
20Deprecated: ini_set(): Use of mbstring.internal_encoding is deprecated in %s on line %d
21string(11) "ISO-8859-15"
22string(5) "UTF-8"
23string(5) "UTF-8"
24string(5) "UTF-8"
25string(5) "UTF-8"
26