81. What will be the output of the following PHP code ?
<?php
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x=0; $x < count($user) - 1; $x++)
{
if ($user[$x++] == "Shrek")
continue;
printf ($user[$x]);
}
?>
<?php
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x=0; $x < count($user) - 1; $x++)
{
if ($user[$x++] == "Shrek")
continue;
printf ($user[$x]);
}
?>
82. What will be the output of the following PHP code ?
<?php
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x = 0; $x < count($user); $x)
{
if ($user[$x++] == "Shrek")
continue;
printf ($user[$x]);
}
?>
<?php
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x = 0; $x < count($user); $x)
{
if ($user[$x++] == "Shrek")
continue;
printf ($user[$x]);
}
?>
83. What will be the output of the following PHP code ?
<?php
for ($i = 0; $i % ++$i; $i++)
{
print"i";
}
?>
<?php
for ($i = 0; $i % ++$i; $i++)
{
print"i";
}
?>
84. What will be the output of the following PHP code ?
<?php
for ($i = 0; $i < 5; $i++)
{
for(; $i < 5; $i++)
print"i";
}
?>
<?php
for ($i = 0; $i < 5; $i++)
{
for(; $i < 5; $i++)
print"i";
}
?>
85. What will be the output of the following PHP code ?
<?php
$a = array("hi", "hello", "bye");
foreach ($a as $value)
{
if (count($a) == 2)
print $value;
}
?>
<?php
$a = array("hi", "hello", "bye");
foreach ($a as $value)
{
if (count($a) == 2)
print $value;
}
?>
86. What will be the output of the following PHP code ?
<?php
$a = array("hi", "hello", "bye");
for (;count($a) < 5;)
{
if (count($a) == 3)
print $a;
}
?>
<?php
$a = array("hi", "hello", "bye");
for (;count($a) < 5;)
{
if (count($a) == 3)
print $a;
}
?>