πŸ“Š PHP
Q. What will be the output of the following PHP code?
Code:
<?php
function start($string)
{
    if ($string < 45)
        return 20;
    else
        return 40;
}
$t = start(90);
if ($t < 20)
{
    echo "Have a good day!";
}
else
{
    echo "Have a good night!";
}
?>
  • (A) ERROR
  • (B) Have a good day!
  • (C) Have a good night!
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Have a good night!

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
73247
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Yogesh
Publisher
πŸ“ˆ
89%
Success Rate