How to realize downward rounding by using floor () function in PHP
This article will explain in detail how PHP uses the floor () function to achieve downward rounding. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Floor: round down
The floor () function rounds down to the nearest integer.
Syntax: floor (x)
Parameters.
X must. The number that is required to be rounded.
Description: returns the next integer not greater than x, rounding off the fractional part of x. The type returned by floor () is still float, because the range of float values is usually larger than integer.
Example:
Output:
0055-6-6 on "PHP how to use floor () function to achieve downward rounding" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.