ExamVeda
Login
Home
Control Structures(Loop in PHP)
?

What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 5;
$z = 3;
if ($x / $y / $z)
    print "hi";
else
    print "hello";
?>

Answer & Solution
Correct Answer: Option A
In php division returns a float that is a non zero value thus evaluates to true.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.