1--TEST-- 2locale_get_default() 3--INI-- 4intl.default_locale=en-US 5--SKIPIF-- 6<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 7--FILE-- 8<?php 9 10/* 11 * Try getting the default Locale with different locales 12 * with Procedural and Object methods. 13 */ 14 15function ut_main() 16{ 17 $res_str = ''; 18 19 $lang = ut_loc_get_default() ; 20 $res_str .= "Default locale: $lang"; 21 $res_str .= "\n"; 22 23 locale_set_default('de-DE'); 24 $lang = ut_loc_get_default() ; 25 $res_str .= "Default locale: $lang"; 26 $res_str .= "\n"; 27 28 ini_set('intl.default_locale', 'fr'); 29 $lang = ut_loc_get_default() ; 30 $res_str .= "Default locale: $lang"; 31 $res_str .= "\n"; 32 33 ini_restore("intl.default_locale"); 34 35 return $res_str; 36 37} 38 39include_once( 'ut_common.inc' ); 40ut_run(); 41 42?> 43--EXPECT-- 44Default locale: en-US 45Default locale: de-DE 46Default locale: fr 47