CSE :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{
while ($i --> 0)
print $i;
}
?>
-
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{
while (--$i > 0)
print $i;
}
?>
-
What will be the output of the following PHP code ?
<?php
echo 5 * 9 / 3 + 9;
?>
-
What will be the output of the following PHP code ?
<?php
$i = 0;
$j = 0;
if ($i && ($j = $i + 10))
{
echo "true";
}
echo $j;
?>
-
What will be the output of the following PHP code ?
<?php
$i = 10;
$j = 0;
if ($i || ($j = $i + 10))
{
echo "true";
}
echo $j;
?>
-
What will be the output of the following PHP code ?
<?php
$i = 1;
if ($i++ && ($i == 1))
printf("Yesn$i");
else
printf("Non$i");
?>
-
What will be the output of the following PHP code ?
<?php
$a = 1; $b = 3;
$d = $a++ + ++$b;
echo $d;
?>
-
What will be the output of the following PHP code ?
<?php
$a = 1; $b = 1; $d = 1;
print ++$a + ++$a+$a++; print $a++ + ++$b; print ++$d + $d++ + $a++;
?>
-
What will be the output of the following PHP code ?
<?php
$a = 10; $b = 10;
if ($a = 5)
$b--;
print $a;print $b--;
?>
-
What will be the output of the following PHP code ?
<?php
$i = 0;
$x = $i++; $y = ++$i;
print $x; print $y;
?>