48 of 410 menu

The floor Function

The floor function rounds a fraction down. This means that regardless of the digit at the beginning of the fractional part, the fraction will still be rounded without increasing the integer part by 1. For example, 12.9 will be rounded to 12.

Syntax

floor(number);

Example

Let's round 4.9 down:

<?php echo floor(4.9); ?>

Code execution result:

4

See Also

  • the round function,
    which rounds a fraction according to mathematical rules
  • the ceil function,
    which rounds a fraction up
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline