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--EXPECT-- 33German_Germany.1252 34-------------------------- 35 sep: , 36 %f: 3,410000 37 %F: 3.410000 38date: 05.12.2014 39 40English_United States.1252 41-------------------------- 42 sep: . 43 %f: 3.410000 44 %F: 3.410000 45date: 12/5/2014 46 47French_France.1252 48-------------------------- 49 sep: , 50 %f: 3,410000 51 %F: 3.410000 52date: 05/12/2014 53 54German_Germany.1252 55-------------------------- 56 sep: , 57 %f: 3,410000 58 %F: 3.410000 59date: 05.12.2014 60