Home

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

A. redgreen

B. red green

C. 0

D. error

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 $fname = array(Peter, Ben, Joe);$age = array(35,…
  2. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  3. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  4. If the format is F then which one of the following will be returned?
  5. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  6. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  7. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  8. Which one of the following function is used to start a session?
  9. Say you want to calculate the date 45 days from the present date which one of the following statement…
  10. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  11. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  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 PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  14. Which one of the following is the default PHP session name?
  15. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  16. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  17. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  18. If session.use_cookie is set to 0, this results in use of..
  19. Which one of the following is the very first task executed by a session enabled page?
  20. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  21. 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,…
  22. Which function displays the web pages most recent modification date?
  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 define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  25. What is the default number of seconds that cached session pages are made available before the new pages…
  26. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  27. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  28. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  29. The date() function returns ___ representation of the current date and/or time.
  30. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…