Home
Subscribe TechModgy to learn about new technologies!

What will be the output of the following PHP code?
 <?php  $a1 = array_fill(3, 4, blue);
$b1 = array_fill(0, 1, red);
print_r($a1);
echo
;
print_r($b1);
?>

A.

Array ( [3] => blue [4] => blue) 
Array ( [0] => red )

B.

Array ( [4] => blue [5] => blue [6] => blue) 
Array ( [0] => red )

C.

Array ( [3] => blue [4] => blue [5] => blue [6] => blue ) 
Array ()

D.

Array ( [3] => blue [4] => blue [5] => blue [6] => blue ) 
Array ( [0] => red )

0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  • Which one of the following function is used to start a session?
  • If the format is F then which one of the following will be returned?
  • What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  • To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  • Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  • Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  • What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  • Say you want to calculate the date 45 days from the present date which one of the following statement…
  • What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  • Which one of the following is the very first task executed by a session enabled page?
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  • Which one of the following is the default PHP session name?
  • If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  • What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  • What is the default number of seconds that cached session pages are made available before the new pages…
  • What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  • What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  • What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  • What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  • A PHP script should start with ___ and end with ___:
  • What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  • What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  • The date() function returns ___ representation of the current date and/or time.
  • PHP files have a default file extension of..
  • -->

    Please do not use chat terms. Example: avoid using "grt" instead of "great".