?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$i = 1;
if ($i++ && ($i == 1))
printf("Yesn$i");
else
printf("Non$i");
?>
<?php
$i = 1;
if ($i++ && ($i == 1))
printf("Yesn$i");
else
printf("Non$i");
?>
Answer & Solution
Correct Answer:
Option
A
The first condition returns true and increments but the second condition is false.
Join the Discussion
Login to post a comment or share your explanation.
Login