Annotation of embedaddon/php/ext/mbstring/tests/bug48697.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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
! 7: ini_set('mbstring.internal_encoding', 'ISO-8859-15');
! 8: ini_set('mbstring.encoding_translation', true);
! 9: var_dump(mb_internal_encoding());
! 10: mb_internal_encoding('UTF-8');
! 11: var_dump(mb_internal_encoding());
! 12: parse_str('a=b');
! 13: var_dump(mb_internal_encoding());
! 14: mb_internal_encoding('UTF-8');
! 15: var_dump(mb_internal_encoding());
! 16: parse_str('a=b');
! 17: var_dump(mb_internal_encoding());
! 18: ?>
! 19: --EXPECT--
! 20: string(11) "ISO-8859-15"
! 21: string(5) "UTF-8"
! 22: string(5) "UTF-8"
! 23: string(5) "UTF-8"
! 24: string(5) "UTF-8"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>