?
What will be the output of the following PHP code?
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");
?>
<?php
$num = "123";
if (!filter_var($num, FILTER_VALIDATE_INT))
echo("Integer is not valid");
else
echo("Integer is valid");
?>
Answer & Solution
Correct Answer:
Option
C
filter_var() – Filters a single variable with a specified filter.
Join the Discussion
Login to post a comment or share your explanation.
Login