
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Filter and Validate Float Constant in PHP
The FILTER_VALIDATE_FLOAT constant validates a value as a float number.
Return
The FILTER_VALIDATE_FLOAT constant does not return anything.
Example
<?php $var = 291.9; var_dump(filter_var($var, FILTER_VALIDATE_FLOAT)); ?>
Output
The following is the output.
float(291.9)
Advertisements