Floor () - Always Rounding Down
Friday October 2, 2009
The Floor() PHP function is used to always round down to the nearest whole number. The PHP function Floor () behaves identical to the MySQL use; even the largest decimal will always be rounded down.


You’ve probably mixed up ceil() function examples with floor(). If this is not the case then here are few corrections :
echo ceil(3.99999999);
// should echo 4, NOT 3
echo ceil(-3.14159265);
// should echo -3, not -4