PHP FILTER_SANITIZE_NUMBER_INT Filter

The FILTER_SANITIZE_NUMBER_INT filter removes all illegal characters from a number.

This filter allows digits and . + -

  • Name: "number_int"
  • ID-number: 519
  • Example -

    The output of the code will be : -

    string(5) "5-2+3"