Home

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

A. redgreen

B. red green

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 $i = 5;while (--$i > 0 || ++$i){ print…
  2. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  3. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  4. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  5. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  6. 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,…
  7. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  8. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  9. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  10. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  11. What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  12. What is the default number of seconds that cached session pages are made available before the new pages…
  13. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  14. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  15. Which one of the following is the default PHP session name?
  16. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  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 class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  19. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  20. A PHP script should start with ___ and end with ___:
  21. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  22. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  23. PHP files have a default file extension of..
  24. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0){ $i++;print $i;print…
  25. What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  26. Which one of the following function is useful for producing a timestamp based on a given date and time.
  27. Which directive determines how the session information will be stored?
  28. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  29. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  30. Which one of the following function is used to start a session?