Examveda
Examveda

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

A. 0

B. 1

C. error

D. how are u

Answer: Option D

Solution(By Examveda Team)

x&0 is 0,thus evaluated to false.

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

Join The Discussion

Related Questions on Control Structures(Loop in PHP)