Home

What will be the output of the following PHP code ?
 <?php  define('GREETING_TEST', 'PHP is a scripting language', true);
echo GREETING_TESt;
$changing_variable = 'test';
echo constant('GREETING_' . strtoupper($changing_variable));
?>

A. PHP is a scripting language
PHP is a scripting language

B. GREETING_TESt

C. PHP is a scripting language

D. PHP is a scripting language
GREETING_TEST

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 code? If say date is 22/06/2013. <?php echo Today is .date(F…
  2. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  3. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  4. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  5. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  6. What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  7. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  8. What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  9. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  10. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  11. What is the default time(in seconds) for which session data is considered valid?
  12. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  13. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  14. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  15. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  16. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  17. What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  18. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  19. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  20. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  21. PHP files have a default file extension of..
  22. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  23. Which one of the following function is used to start a session?
  24. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  25. Say you want to calculate the date 45 days from the present date which one of the following statement…
  26. If session.use_cookie is set to 0, this results in use of..
  27. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;echo $color1…
  28. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  29. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  30. How many ways can a session data be stored?