Question No : 43
What will be the output of the following PHP code? If say date is 22/06/2013.
<?php printf( date(t) ) ?>
Question No : 44
What will be the output of the following PHP code?
<?php $fname = array(Peter, Ben, Joe);
$age = array(35, 37, 43);
$c = array_combine($fname, $age);
print_r($c);
?>
Array ( Peter Ben Joe )
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
Array ( 35 37 43 )
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
Question No : 45
What will be the output of the following PHP code ?
<?php $i = 0;
while ((--$i > ++$i) - 1){ print $i;
} ?>
Question No : 46
What will be the output of the following PHP code ?
<?php $color = red;
echo $color . red ;
?>
Question No : 47
What will be the output of the following PHP code ?
<?php $color1 = red;
$color2 = red;
echo $color1 + $color2;
?>
Question No : 48
What will be the output of the following PHP code ?
<?php define('GOOD_OCTAL', 0700);
define('BAD_OCTAL', 0600);
print GOOD_OCTAL;
print '
';
print BAD_OCTAL;
?>
Question No : 49
What will be the output of the following PHP code?
<?php $a1 = array(red, green);
$a2 = array(blue, yellow);
print_r(array_merge($a1, $a2));
?>
Array ( [0] => red [1] => green)
Array ( [0] => blue [1] => yellow [2] => red [3] => green )
Array ( [0] => red [1] => green [2] => blue [3] => yellow )
Array ( [0] => blue [1] => yellow )