Is working with money (decimal numbers) in PHP considered safe?

sh2sh

New Member
I have an \[code\]items\[/code\] table in my MySQL database with a \[code\]DECIMAL(10,2)\[/code\] field called \[code\]price\[/code\].When fetching these values, is it safe to do calculations and such with these numbers in PHP? Or will I end up with potential rounding errors and things like that which are common when working with floating point data types?How does PHP handle these things behind the cover? Is it safe to do money calculations with PHP?
 
Back
Top