What Will Be The Output Of The Following Php Codep Pre Langphp #134
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $num = "123"; if (!filter_var($num, FILTER_VALIDATE_INT)) 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 $num = "123"; if (!filter_var($num, FILTER_VALIDATE_INT)) echo("Integer is not valid"); else echo("Integer is valid"); ?>
No output is returned
Integer is not valid
Integer is valid
Error