1--TEST--
2Bug #65230 setting locale randomly broken
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') {
6    die('skip Windows only test');
7}
8?>
9--INI--
10date.timezone=Europe/Berlin
11error_reporting=E_ALL&~E_DEPRECATED
12--FILE--
13<?php
14
15function test($locale, $value)
16{
17    $newlocale = setlocale(LC_ALL, $locale);
18    $conv      = localeconv();
19    $sep       = $conv['decimal_point'];
20
21    printf("%s\n--------------------------\n", $newlocale);
22    printf(" sep: %s\n", $sep);
23    printf("  %%f: %f\n", $value);
24    printf("  %%F: %F\n", $value);
25    printf("date: %s\n", strftime('%x', mktime(0, 0, 0, 12, 5, 2014)));
26    printf("\n");
27}
28
29test('german', 3.41);
30test('english', 3.41);
31test('french', 3.41);
32test('german', 3.41);
33?>
34--EXPECT--
35German_Germany.1252
36--------------------------
37 sep: ,
38  %f: 3,410000
39  %F: 3.410000
40date: 05.12.2014
41
42English_United States.1252
43--------------------------
44 sep: .
45  %f: 3.410000
46  %F: 3.410000
47date: 12/5/2014
48
49French_France.1252
50--------------------------
51 sep: ,
52  %f: 3,410000
53  %F: 3.410000
54date: 05/12/2014
55
56German_Germany.1252
57--------------------------
58 sep: ,
59  %f: 3,410000
60  %F: 3.410000
61date: 05.12.2014
62