number_format is NOT exact toFixed equivelant.
PHP:
number_format(0.585*11, 2, '.', ""); string(4) "6.44"
Javascript toFixed has a flaw:
(0.585*11).toFixed(2); "6.43"
Live with it ... or don't use float for finances.