In PHP, because variables aren't given definitive data types PHP will do conversions on the fly. This can lead to some unusual quirks. Recently I was using the round() function to round the decimals after a number. For some reason the function returned a whole number without the decimals. After a bit of digging around, it turned out I was passing an object into round() and so PHP must have been converting it to an integer before rounding. My quick fix was to type cast the variable like so:

$roundedValue = round( (float)$value, 2 );