Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x = $x& 0)
    print $x;
else
    break;
?>

A. 0

B. 1

C. error

D. no output

Answer: Option C

Solution(By Examveda Team)

break is not defined for a if else ladder.

This Question Belongs to PHP >> Control Structures(Loop In PHP)

Join The Discussion

Related Questions on Control Structures(Loop in PHP)