I'm sitting on a machine with en_US locale and this piece of PHP code
setlocale(LC_ALL,'de_DE.utf8');
var_dump((string)1.234);
returns
string(5) "1.234"
whereas on my colleague's machine which has a German locale, it returns
string(5) "1,234"
Why the heck does PHP use the locale when typecasting floats to strings? How can I disable it? I'd like to have this function return string(5) "1.234" on all machines, regardless of any locale settings.
Secondly and less important: Why does PHP ignore the setlocale on my machine?