PHP Filters


  1. Which one of the following filter checks if variable of specified type exists?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    filter_has_var


  1. If the input variable is a string like this “http://www.innnttteeerrrvvviiieeeewwwmaaanniiiiaaaa/”, the $url variable after the sanitizing will look like











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Sanitize is nothing but take away invalid characters so therefore the invalid characters like å and ø will be removed.



  1. Which one of the following does not describe a validating filter?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Are used to allow or disallow specific characters in a string


  1. Which one of the following filter is used to filter several variables with the same or different filters?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    filter_var_array()



  1. How many types of filtering are present in PHP?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    There are two main types of filtering: validation and sanitization.