Hi folks!
This is my first Post here
We have switched from PHP 5.6 to PHP 7.3 a few weeks ago. Most things worked fine and we are very happy to left PHP 5 behind us and can do a much better programming than before.
But actually we have a big problem. Since we changed to PHP 7.3 we found an bug we do not understand were this is coming from.
In our system we do some calculation and invoicing. In that places we often use float datatype. Normally we would excpect, that all float types got a format with a “dot” for example “1017.87”.
Now sometimes we have the bug, that the float types are with “comma” so for example “1017,87”.
In the PHP Documentation we found this part when using “setLocale”:
Warning
The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS, HHVM or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale() . This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale() .
So we checkt our whole project, were this could be a problem. But even when we switched to use only the LC_TIME instead of LC_ALL, this does happen.
Since the programm was running normally on PHP 5.6 we checked some release notes but even found something that could be the problem.
Maybe someone out here in the community can help us.
Best Regards!
TobyMaxham