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
11--FILE--
12<?php
13
14function test($locale, $value)
15{
16    $newlocale = setlocale(LC_ALL, $locale);
17    $conv      = localeconv();
18    $sep       = $conv['decimal_point'];
19
20    printf("%s\n--------------------------\n", $newlocale);
21    printf(" sep: %s\n", $sep);
22    printf("  %%f: %f\n", $value);
23    printf("  %%F: %F\n", $value);
24    printf("date: %s\n", strftime('%x', mktime(0, 0, 0, 12, 5, 2014)));
25    printf("\n");
26}
27
28test('german', 3.41);
29test('english', 3.41);
30test('french', 3.41);
31test('german', 3.41);
32?>
33--EXPECT--
34German_Germany.1252
35--------------------------
36 sep: ,
37  %f: 3,410000
38  %F: 3.410000
39date: 05.12.2014
40
41English_United States.1252
42--------------------------
43 sep: .
44  %f: 3.410000
45  %F: 3.410000
46date: 12/5/2014
47
48French_France.1252
49--------------------------
50 sep: ,
51  %f: 3,410000
52  %F: 3.410000
53date: 05/12/2014
54
55German_Germany.1252
56--------------------------
57 sep: ,
58  %f: 3,410000
59  %F: 3.410000
60date: 05.12.2014
61