ExamVeda
Login
Home
Control Structures(Loop in PHP)
?

What will be the output of the following PHP code ?
<?php
$a = 1;
if ($a--)
    print "True";
if ($a++)
    print "False"; 
?>

Answer & Solution
Correct Answer: Option A
Due to post increment and post decrement only the first condition is satisfied.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.