Home

What will be the output of the following PHP code ?
 <?php  $color1 = red;
$color2 = 1;
$color3 = greyecho $color1 + $color2 . $color3;
?>

A. 1grey

B. grey

C. 0

D. red1grey

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 $age = array(Peter=>35, Ben=>37, Joe=>43);print_r(array_change_key_case($age,…
  2. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  3. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  4. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  5. Which one of the following format parameter can be used to identify timezone?
  6. Say you want to calculate the date 45 days from the present date which one of the following statement…
  7. Which directive determines how the session information will be stored?
  8. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  9. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  10. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  11. What is the default number of seconds that cached session pages are made available before the new pages…
  12. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  13. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  14. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  15. Which one of the following is the very first task executed by a session enabled page?
  16. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  17. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  18. If the format is F then which one of the following will be returned?
  19. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  20. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  21. If session.use_cookie is set to 0, this results in use of..
  22. Which one of the following function is used to start a session?
  23. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  24. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  25. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  26. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  27. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  28. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  29. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  30. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…