?
What will be the output of the following PHP code ?
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";
?>
<?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.
Join the Discussion
Login to post a comment or share your explanation.
Login