Home

What will be the output of the following PHP code?
 <?php  $a = array(A, Cat, Dog, A, Dog);
print_r(array_count_values($a));
?>

A.

Array ( [A] => 2 [Cat] => 1 [Dog] => 2 )

B.

Array ( [A] => 2 [Cat] => 2 [Dog] => 1 )

C.

Array ( [A] => 1 [Cat] => 1 [Dog] => 2 )

D.

Array ( [A] => 2 [Cat] => 1 [Dog] => 1)

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 $cars = array(Volvo, BMW, Toyota, Honda,…
  2. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  3. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  4. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  5. What will be the output of the following code? If say date is 22/06/2013. <?php echo Today is .date(F…
  6. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  7. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  8. Which directive determines how the session information will be stored?
  9. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  10. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  11. Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  12. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  13. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  14. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  15. Which function displays the web pages most recent modification date?
  16. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  17. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  18. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  19. What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  20. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  21. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  22. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  23. Which one of the following format parameter can be used to identify timezone?
  24. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  25. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  26. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  27. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  28. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  29. PHP files have a default file extension of..
  30. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…