File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
intl /
tests /
locale_get_default.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:56 2012 UTC (12 years, 7 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
locale_get_default()
--INI--
intl.default_locale=en-US
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
/*
* Try getting the default Locale with different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str = '';
$lang = ut_loc_get_default() ;
$res_str .= "Default locale: $lang";
$res_str .= "\n";
locale_set_default('de-DE');
$lang = ut_loc_get_default() ;
$res_str .= "Default locale: $lang";
$res_str .= "\n";
ini_set('intl.default_locale', 'fr');
$lang = ut_loc_get_default() ;
$res_str .= "Default locale: $lang";
$res_str .= "\n";
ini_restore("intl.default_locale");
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
Default locale: en-US
Default locale: de-DE
Default locale: fr
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>