Why http_build_query() was to change the decimal point to a comma?

In one project, which I did, "suddenly" stopped working authorization in VK. A friend asked to see what was the matter. It was found that in approximately this fragment instead of a point began to appear a comma:
$params = [
 'access_token' => 'xxxxx',
 'v' => 5.67
];
$url = 'https://api.vk.com/method/users.get?' . http_build_query($params);

It turns out the link ...&v=5,67 - with the comma. VK says it is API version 5.0 and everything works as expected.

Hastily he corrected, taking the version in quotes as a string it passes unchanged.

But osadochek remained: how and why "suddenly" began to appear comma?
March 23rd 20 at 19:11
1 answer
March 23rd 20 at 19:13
Solution
from the locale setting depends
actually, Yes. But I have not found mention of this in the documentation http_build_query() - Vida commented on March 23rd 20 at 19:16
@Vida is the time to make it to the treasure in the Doc, Russian maintainer locale will be grateful ) - chelsea_Welch commented on March 23rd 20 at 19:19

Find more questions by tags PHP