1--TEST-- 2Check that "internal_encoding" ini is picked up by mbstring 3--EXTENSIONS-- 4mbstring 5--INI-- 6internal_encoding=iso-8859-1 7--FILE-- 8<?php 9 10var_dump(mb_internal_encoding()); 11var_dump(mb_strlen("\xc3\xb6")); 12 13ini_set('mbstring.internal_encoding', 'utf-8'); 14 15var_dump(mb_internal_encoding()); 16var_dump(mb_strlen("\xc3\xb6")); 17 18// mbstring.internal_encoding is set, this has no effect 19ini_set('internal_encoding', 'iso-8859-2'); 20 21var_dump(mb_internal_encoding()); 22var_dump(mb_strlen("\xc3\xb6")); 23 24// mbstring.internal_encoding is unset, pick up internal_encoding again 25ini_set('mbstring.internal_encoding', ''); 26 27var_dump(mb_internal_encoding()); 28var_dump(mb_strlen("\xc3\xb6")); 29 30mb_internal_encoding('utf-8'); 31 32var_dump(mb_internal_encoding()); 33var_dump(mb_strlen("\xc3\xb6")); 34 35// mb_internal_encoding() is set, this has no effect 36ini_set('internal_encoding', 'iso-8859-3'); 37 38var_dump(mb_internal_encoding()); 39var_dump(mb_strlen("\xc3\xb6")); 40 41// mbstring.internal_encoding is unset, pick up internal_encoding again 42ini_set('mbstring.internal_encoding', ''); 43 44var_dump(mb_internal_encoding()); 45var_dump(mb_strlen("\xc3\xb6")); 46 47?> 48--EXPECTF-- 49string(10) "ISO-8859-1" 50int(2) 51 52Deprecated: ini_set(): Use of mbstring.internal_encoding is deprecated in %s on line %d 53string(5) "UTF-8" 54int(1) 55string(5) "UTF-8" 56int(1) 57 58Deprecated: ini_set(): Use of mbstring.internal_encoding is deprecated in %s on line %d 59string(10) "ISO-8859-2" 60int(2) 61string(5) "UTF-8" 62int(1) 63string(5) "UTF-8" 64int(1) 65 66Deprecated: ini_set(): Use of mbstring.internal_encoding is deprecated in %s on line %d 67string(10) "ISO-8859-3" 68int(2) 69