
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
floor() function in PHP
The ceil() function rounds a number down to the nearest integer.
Syntax
floor(num)
Parameters
num − The number to round up
Return
The floor() function Returns the value rounded up to the nearest (down) integer.
Example
<?php echo(floor(0.10) . "<\n>"); echo(floor(0.55) ); ?>
Output
0 0
Let us see another example −
Example
<?php echo(floor(9)); ?>
Output
9
Let us see another example −
Example
<?php echo(floor(7.8) . "\n"); echo(floor(-4.2)); ?>
Output
7 -5
- Related Questions & Answers
- PHP floor() Function
- floor() and ceil() function Python
- file_exists() function in PHP
- basename( ) function in PHP
- chgrp()function in PHP
- chmod() function in PHP
- chown() function in PHP
- clearstatcache() function in PHP
- copy() function in PHP
- delete() function in PHP
- dirname()function in PHP
- disk_free_space() function in PHP
- disk_total_space() function in PHP
- diskfreespace() function in PHP
- fclose() function in PHP
Advertisements