Home

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

A.

Array ( [0] => red [1] => green )

B.

Array ( [0] => green [1] => blue )

C.

Array ( [0] => red [1] => blue )

D.

Array ( [0] => blue [1] => 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 class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  2. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  3. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  4. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  5. Which one of the following is the very first task executed by a session enabled page?
  6. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  7. If the format is F then which one of the following will be returned?
  8. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  9. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  10. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  11. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  12. How many ways can a session data be stored?
  13. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  14. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  15. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  16. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  17. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  18. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0){ $i++;print $i;print…
  19. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  20. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  21. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  22. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  23. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  24. What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  25. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  26. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  27. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  28. What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  29. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  30. What is the default number of seconds that cached session pages are made available before the new pages…