- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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_SANITIZE_NUMBER_INT constant in PHP
The FILTER_SANITIZE_NUMBER_INT constant deletes all illegal characters from a number.
Return
The FILTER_SANITIZE_NUMBER_INT constant does not return anything.
Example
<?php $var = "4-5+9p"; var_dump(filter_var($var, FILTER_SANITIZE_NUMBER_INT)); ?>
Output
The following is the output.
string(5) "4-5+9"
Advertisements