Home  >  Article  >  Backend Development  >  Which is the php rounding down function?

Which is the php rounding down function?

藏色散人
藏色散人Original
2020-08-06 09:17:085019browse

php The rounding down function is "floor()". The function of the floor function is to round down to the nearest integer. Its return value is the next integer not greater than value, which is the decimal of value. Round off parts.

Which is the php rounding down function?

Recommendation: "PHP Video Tutorial"

Round down function: floor().

floor() function rounds down to the nearest integer.

Return the next integer not greater than value, and round off the decimal part of value.

Example:

floor(3.14159);    // 3
floor(3.64159);    // 3

The above is the detailed content of Which is the php rounding down function?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn