Which PHP function is particularly useful for validating and filtering data coming from insecure sources?
- filter_var()
- isset()
- htmlentities()
- array_push()
The filter_var() function in PHP is particularly useful for validating and filtering data coming from insecure sources. It allows you to apply various filters, such as validating email addresses or sanitizing input, to ensure that the data is safe and adheres to the desired format.
Loading...
Related Quiz
- To destroy a session in PHP, you can use the session_destroy() ______.
- A PHP class cannot have more than one constructor.
- You are writing a PHP script and you decide to use Object-Oriented Programming. How would you define a class?
- What function is used to read the contents of a file in PHP?
- You have a long string containing multiple words and you need to extract each word as an individual item in an array. Which PHP function would be most suitable for this task?