Home

What will be the output of the following PHP code?
 <?php   $fname = array(Peter, Ben, Joe);
$age = array(35, 37, 43);
$c = array_combine($fname, $age);
print_r($c);
?>

A.

Array ( Peter Ben Joe )

B.

Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

C.

Array ( 35 37 43 )

D.

Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

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 $color1 = red;$color2 = green;echo $color1…
  2. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  3. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  4. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  5. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  6. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  7. Which one of the following function is useful for producing a timestamp based on a given date and time.
  8. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  9. Which function displays the web pages most recent modification date?
  10. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  11. PHP files have a default file extension of..
  12. What will be the output of the following PHP code? <?php $age = array(Peter=>35, Ben=>37, Joe=>43);print_r(array_change_key_case($age,…
  13. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  14. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  15. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  16. Which directive determines how the session information will be stored?
  17. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  18. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  19. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  20. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  21. Which one of the following is the very first task executed by a session enabled page?
  22. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  23. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  24. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  25. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  26. Say you want to calculate the date 45 days from the present date which one of the following statement…
  27. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  28. Which one of the following format parameter can be used to identify timezone?
  29. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  30. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…