1--TEST-- 2Test that float to string and string to float casts are consistent 3--SKIPIF-- 4<?php 5if (!setlocale( 6 LC_ALL, 7 "german", "de", "de_DE", "de_DE.ISO8859-1", "de_DE.ISO_8859-1", "de_DE.UTF-8", 8 "french", "fr", "fr_FR", "fr_FR.ISO8859-1", "fr_FR.ISO_8859-1", "fr_FR.UTF-8", 9)) { 10 die("skip locale needed for this test is not supported on this platform"); 11} 12?> 13--FILE-- 14<?php 15 16setlocale( 17 LC_ALL, 18 "german", "de", "de_DE", "de_DE.ISO8859-1", "de_DE.ISO_8859-1", "de_DE.UTF-8", 19 "french", "fr", "fr_FR", "fr_FR.ISO8859-1", "fr_FR.ISO_8859-1", "fr_FR.UTF-8", 20); 21 22$float = 1/3; 23$string = (string) $float; 24$float = (float) $string; 25 26printf("%.2f", $float); 27 28?> 29--EXPECT-- 300,33 31