Which one of the following filter is used to filter several variables with the same or different filters? filter_var_array() filter_input_array filter_var() filter_input TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following filter checks if variable of specified type exists? filter_var_array filter_has_var filter_id filter_var TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$num = "123";<br/>if (!filter_var($num, FILTER_VALIDATE_INT))<br/>echo("Integer is not valid");<br/>else<br/>echo("Integer is valid"); Integer is not valid Error Integer is valid No output is returned TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following does not describe a validating filter? Strict format rules Are used to allow or disallow specified characters in a string Returns the expected type on success or FALSE on failure Are used to validate user input TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is/are an external data?<br/>1. Cookies<br/>2. Input data from a form<br/>3. Server Variables<br/>4. Web services data None of the mentioned 2 and 3 Only 2 All of the mentioned TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>function convertSpace($string)<br/>{<br/>return str_replace("_", " ", $string);<br/>}<br/>$string = "Peter_is_a_great_guy!";<br/>echo filter_var($string, FILTER_CALLBACK, array("options"=>"convertSpace")); Peter_is_a_great_guy! Error Peter is a great guy! Peterisagreatguy! TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$value = 'car';<br/>$result = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); FALSE TRUE NULL ERROR TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$var=300;<br/>$int_options = array("options"=>array ("min_range"=>0, "max_range"=>256));<br/>if (!filter_var($var, FILTER_VALIDATE_INT, $int_options))<br/>echo("Integer is not valid");<br/>else<br/>echo("Integer is valid"); No output is returned Integer is not valid Error Integer is valid TRUE ANSWER : ? YOUR ANSWER : ?