xref: /PHP-5.5/ext/intl/tests/bug67052.phpt (revision 941bbf20)
1--TEST--
2Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5<?php
6if (substr(PHP_OS, 0, 3) == 'WIN') {
7  die("skip Valid only on non Windows");
8}
9?>
10--FILE--
11<?php
12
13function ut_main()
14{
15        setlocale(LC_ALL, 'de_DE.UTF-8');
16        $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
17        $num = "1.234.567,891";
18        $res_str =  $fmt->parse($num)."\n";
19        $res_str .=  setlocale(LC_NUMERIC, 0);
20        return $res_str;
21}
22
23include_once( 'ut_common.inc' );
24ut_run();
25
26?>
27--EXPECT--
281234567,891
29de_DE.UTF-8
30
31