Which is the php rounding down function?

藏色散人
Release: 2023-03-03 20:50:01
Original
5003 people have browsed it

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
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!