Home

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

A. 11

B. 2

C. 0

D. 1

Please do not use chat terms. Example: avoid using "grt" instead of "great".

You can do it
  1. What is the default time(in seconds) for which session data is considered valid?
  2. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  3. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  4. What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  5. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  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(VAR_NAME,test);${VAR_NAME} = value;echo…
  8. Say you want to calculate the date 45 days from the present date which one of the following statement…
  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 $color1 = red;$color2 = 1;echo $color1…
  11. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  12. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  13. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  14. PHP files have a default file extension of..
  15. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  16. Which directive determines how the session information will be stored?
  17. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  18. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  19. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  20. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  21. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  22. Which one of the following function is useful for producing a timestamp based on a given date and time.
  23. If the format is F then which one of the following will be returned?
  24. Which function displays the web pages most recent modification date?
  25. What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  26. How many ways can a session data be stored?
  27. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  28. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  29. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  30. What is the default number of seconds that cached session pages are made available before the new pages…