floor()


float floor ( float $value )

Description

floor() rounds fractions down

※ available F/W version : all

Parameters

Return values

Returns the next lowest integer value by rounding down value if necessary

Examples

<?php
$val = 123.54;

$ret = floor($val);
echo "ret = $ret\r\n";  // OUTPUT: ret = 123
?>

See also

ceil() / round()

Remarks

This function is identical to the PHP group’s floor() function.