?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$a = "1";
$b = "0";
if ((int)$a && $b)
print"hi";
else
print "hello";
?>
<?php
$a = "1";
$b = "0";
if ((int)$a && $b)
print"hi";
else
print "hello";
?>
Answer & Solution
Correct Answer:
Option
A
The expression is evaluated with values contained in the string, even without typecasting.
Join the Discussion
Login to post a comment or share your explanation.
Login