Home

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

A. red1

B. red 1

C. 0

D. 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 $color1 = red;$color2 = red;echo $color1…
  2. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  3. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  4. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  5. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  6. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  7. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  8. Which one of the following function is used to start a session?
  9. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  10. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  11. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  12. How many ways can a session data be stored?
  13. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  14. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  15. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  16. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  17. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  18. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  19. PHP files have a default file extension of..
  20. 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,…
  21. Which one of the following format parameter can be used to identify timezone?
  22. If session.use_cookie is set to 0, this results in use of..
  23. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  24. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  25. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  26. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  27. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  28. What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  29. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  30. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…