ExamVeda
Login
Home
Operators and Expressions in php
?

What will be the output of the following PHP code ?
<?php
$a = 10; $b = 10;
if ($a = 5)
    $b--;
print $a;print $b--;
?>

Answer & Solution
Correct Answer: Option B
a is set to 5 in the if condition and b is postdecremented in the print statement.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.