CSE :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$x = 0;
function fun()
{
echo $GLOBALS['x'];
$x++;
}
fun();
fun();
fun();
?>
-
What will be the output of the following PHP code ?
<?php
$a = 10;
echo ++$a;
echo $a++;
echo $a;
echo ++$a;
?>
-
What will be the output of the following PHP code ?
<?php
$a = 12;
--$a;
echo $a++;
?>
-
What will be the output of the following PHP code ?
<?php
$x = "test";
$y = "this";
$z = "also";
$x .= $y .= $z ;
echo $x;
echo $y;
?>
-
What will be the output of the following PHP code ?
<?php
$x = 1;
$y = 2;
if (++$x == $y++)
{
echo "true ", $y, $x;
}
?>
-
What will be the output of the following PHP code ?
<?php
$y = 2;
$w = 4;
$y *= $w /= $y;
echo $y, $w;
?>
-
What will be the output of the following PHP code ?
<?php
$y = 2;
if ($y-- == ++$y)
{
echo $y;
}
?>
-
What will be the output of the following PHP code ?
<?php
$y = 2;
if (**$y == 4)
{
echo $y;
}
?>
-
What will be the output of the following PHP code ?
<?php
$y = 2;
if (--$y == 2 || $y xor --$y)
{
echo $y;
}
?>
-
What will be the output of the following PHP code ?
<?php
$y = 2;
if (--$y <> ($y != $y++))
{
echo $y;
}
?>