Home

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 )

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

You can do it
  1. Which one of the following function is useful for producing a timestamp based on a given date and time.
  2. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  3. Which one of the following is the very first task executed by a session enabled page?
  4. Which one of the following function is used to start a session?
  5. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  6. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  7. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  8. Say you want to calculate the date 45 days from the present date which one of the following statement…
  9. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  10. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  11. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  12. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  13. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  14. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  15. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  16. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0){ $i++;print $i;print…
  17. What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  18. What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  19. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  20. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  21. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  22. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  23. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  24. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  25. Which function displays the web pages most recent modification date?
  26. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  27. Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  28. What will be the output of the following code? If say date is 22/06/2013. <?php echo Today is .date(F…
  29. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  30. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…