Question
<?php
$value = 'car';
$result = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
?>
a.
FALSE
b.
TRUE
c.
NULL
d.
ERROR
Posted under PHP
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the following PHP code?
Similar Questions
Discover Related MCQs
Q. Which one of the following filter checks if variable of specified type exists?
View solution
Q. Which one of the following does not describe a validating filter?
View solution
Q. Which one of the following filter is used to filter several variables with the same or different filters?
View solution
Q. How many types of filtering are present in PHP?
View solution
Q. Which of the following is/are an external data?
i) Cookies
ii) Input data from a form
iii) Server Variables
iv) Web services data
View solution
Q. Which of the following is/are an exception?
i) OutOfBoundException
ii) OutOfRangeException
iii) OverflowException
iv) UnderflowException
View solution
Q. Which of the following is/are not an exception?
i) BadFunctionCallException
ii) BadMethodCallException
iii) LogicException
iv) DomainException
View solution
Q. How many predefined exceptions does SPL provide access to?
View solution
Q. What does SPL stand for?
View solution
Q. You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as__________
View solution
Q. Which one of the following is the right description for the method getMessage() ?
View solution
Q. Which of the following statements invoke the exception class?
View solution
Q. Which version added the method getPrevious()?
View solution
Q. How many methods are available for the exception class?
View solution
Q. Which version of PHP was added with Exception handling?
View solution
Q. Which function is responsible for sending a custom message to the system log?
View solution
Q. Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?
View solution
Q. Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?
View solution
Q. Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?
View solution
Q. Which version introduced the function error_get_last()?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond PHP? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!