?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$auth = 1;
$status = 1;
if ($result = (($auth == 1) && ($status != 0)))
{
print "result is $result";
}
?>
<?php
$auth = 1;
$status = 1;
if ($result = (($auth == 1) && ($status != 0)))
{
print "result is $result";
}
?>
Answer & Solution
Correct Answer:
Option
B
Result is x&&y which returns 1 if both x and y are true.
Join the Discussion
Login to post a comment or share your explanation.
Login