What Will Be The Output Of The Following Php Codep Pre Langphp #136
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $var=300; $int_options = array("options"=>array ("min_range"=>0, "max_range"=>256)); if (!filter_var($var, FILTER_VALIDATE_INT, $int_options)) echo("Integer is not valid"); else echo("Integer is valid"); ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 Error Handling and Exception Handling - PHP Filter - Quiz No.1.
What will be the output of the following PHP code?
<?php $var=300; $int_options = array("options"=>array ("min_range"=>0, "max_range"=>256)); if (!filter_var($var, FILTER_VALIDATE_INT, $int_options)) echo("Integer is not valid"); else echo("Integer is valid"); ?>
No output is returned
Integer is not valid
Integer is valid
Error