Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP FILTER_SANITIZE_NUMBER_FLOAT Filter

PHP FILTER_SANITIZE_NUMBER_FLOAT Filter


PHP Filter Reference Manual Complete PHP Filter Reference Manual


Definition and Usage

The FILTER_SANITIZE_NUMBER_FLOAT filter removes all illegal characters from a float number.

By default this filter allows all digits as well as + -

Possible flags:


Example

The output of the code is shown below:

string(7) "5-2+3.3"


PHP Filter Reference Manual Complete PHP Filter Reference Manual