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")); Peterisagreatguy! Error Peter is a great guy! Peter_is_a_great_guy! TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following filter is used to filter several variables with the same or different filters? filter_input filter_var() filter_var_array() filter_input_array 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 : ?
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 Are used to validate user input Returns the expected type on success or FALSE on failure 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); NULL TRUE FALSE 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"); Integer is valid Error Integer is not valid No output is returned 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 valid No output is returned Integer is not valid Error TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following filter checks if variable of specified type exists? filter_var filter_var_array filter_has_var filter_id TRUE ANSWER : ? YOUR ANSWER : ?