Home

What will be the output of the following PHP code ?
 <?php  define(VAR_NAME,test);
${VAR_NAME} = value;
echo VAR_NAME;
echo ${VAR_NAME};
?>

A. test

B. testtest

C. testvalue

D. error, constant value cannot be changed

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. 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,…
  3. What will be the output of the following code? If say date is 22/06/2013. <?php echo Today is .date(F…
  4. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  5. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  6. What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  7. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  8. Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  9. What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  10. If session.use_cookie is set to 0, this results in use of..
  11. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  12. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  13. PHP files have a default file extension of..
  14. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  15. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  16. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  17. Which one of the following format parameter can be used to identify timezone?
  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 $color = red;echo $color . red ;?>
  20. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  21. The date() function returns ___ representation of the current date and/or time.
  22. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  23. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  24. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  25. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  26. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0){ $i++;print $i;print…
  27. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  28. Which one of the following is the default PHP session name?
  29. What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  30. Which one of the following function is useful for producing a timestamp based on a given date and time.