number_format only works up to 999,99 [closed]

We’ve created a comprehensive table that retrieves currency amounts from a database.

With

number_format($mlz_s_us, 2,'.','')

amounts up to 999.99 are correctly displayed as 999.99.

However, if the amount is higher than 1000, then, for example, the amount 3,113.75 is displayed as “3.11.”

What’s wrong here?

This is Alma Linux 8.10.0 / MariaDB 10.11.13 (latin1_swedish_ci – German) PHP 8.4