PHP FILTER_CALLBACK Filter

The FILTER_CALLBACK filter calls a user defined function to filter the value.This filter gives us full control over the data filtering.

The specified functions must be in an associative array with the name "options". See example below.

  • Name: "callback"
  • ID-number: 1024
  • Example -

    The output of the code will be : -

    Peter_is_a_great_guy!