xref: /PHP-7.2/ext/intl/tests/bug67052-win32.phpt (revision f1d7e3ca)
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 Windows");
8}
9?>
10--FILE--
11<?php
12
13function ut_main()
14{
15        setlocale(LC_ALL, 'de-de');
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
30