I'm pulling values from a MySQL database where the column has the type decimal(10,2) so values are already stored with two decimal places (I'm rounding the value before storing, so 12.346 would be stored as 12.35 which is what I want.)
Those values being pulled from the DB are later being used for some basic math:
$val1 = (float) $val1_from_db; // 12.35
$val2 = (float) $val2_from_db; // 2.51
$val3 = (float) $val3_from_db; // 11.77
In PHP im doing a simple addition of $val1 + $val2 + $val3; and getting the correct value needed 26.63
I'm wondering if this is perfectly fine or if I should be using bcadd