1.

Which one of the following filter checks if the variable of the specified type exists?(a) filter_has_var(b) filter_var(c) filter_id(d) filter_var_arrayThis question was posed to me by my school teacher while I was bunking the class.My question is taken from PHP Filter topic in division Error Handling and Exception Handling in PHP of PHP

Answer»

Correct answer is (a) filter_has_var

Best explanation: The filter filter_has_var checks if the variable of the specified TYPE EXISTS. Whereas the function filter_id() returns filter ID of a specified filter name. The function filter_var() can VALIDATE and SANITIZE data. The function filter_var_array() can get multiple variables and it optionally filters them.



Discussion

No Comment Found

Related InterviewSolutions