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

A. true

B. false

C. error

D. no output

Answer: Option A

Solution(By Examveda Team)

Due to post increment and post decrement only the first condition is satisfied.

Join The Discussion

Related Questions on Control Structures(Loop in PHP)