The filter_var() function in PHP with the FILTER_VALIDATE_INT filter is used to check if a variable is an ______.
- integer
- array
- object
- string
The filter_var() function in PHP with the FILTER_VALIDATE_INT filter is used to check if a variable is an integer. It validates whether the provided value is a valid integer or not. It returns false if the value is not an integer and the validated integer if it is valid. The FILTER_VALIDATE_INT filter is a useful tool to validate integer values in PHP. Refer to: http://php.net/manual/en/function.filter-var.php
Loading...
Related Quiz
- Which of the following are true about the for loop in PHP?
- How can we change the maximum size of the files to be uploaded?
- What is the $_GET superglobal in PHP?
- A common use case for Regular Expressions in PHP is to ______.
- You need to understand if an instance of an abstract class can be created in PHP. What would be your conclusion?