Home

What will be the output of the following PHP code?
 <?php  $a = array(a=>red, b=>green, c=>blue);
echo array_shift($a);
print_r ($a);
?>

A.

green

B.

red

C.

redArray( [c] => green [c] => blue )

D.

redArray( [b] => green [c] => blue )

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

You can do it
  1. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  2. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  3. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  4. If the format is F then which one of the following will be returned?
  5. Which one of the following function is used to start a session?
  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 define(GREETING, PHP is a scripting language,…
  8. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  9. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  10. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  11. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  12. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  13. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;echo $color1…
  14. What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  15. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  16. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  17. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  18. Say you want to calculate the date 45 days from the present date which one of the following statement…
  19. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  20. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  21. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  22. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  23. If session.use_cookie is set to 0, this results in use of..
  24. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  25. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  26. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  27. PHP files have a default file extension of..
  28. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  29. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  30. What is the default time(in seconds) for which session data is considered valid?