php floor() function
Translation results:
n. Floor; ground, floor; bottom; council seat
vt. Flooring; defeat, knock down
Third person singular: floors Plural: floors Present participle: flooring Past tense: floored past participle: floored
php floor() functionsyntax
What does the floor function mean?
php The floor() function is used to round down to the nearest integer. The syntax is floor(number), which means to return the next integer that is no larger than the parameter number. If there is a decimal part, it will be rounded off directly.
Function: Round down to the nearest integer.
Syntax: floor(number)
Parameters:
Parameters | Description |
number | Required, a number |
Description: Return the next integer that is not greater than the parameter number. If there is a decimal part, it will be rounded off directly.
php floor() functionexample
<?php $i = 66.7; $i = floor($i); $j = -66.7; $j = floor($j); echo $i."*****".$j ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
66*****-67