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"