Home

What will be the output of the following PHP code ?
 <?php  class myObject { }define('myObject::CONSTANT', 'test');
echo myObject::CONSTANT;
?>

A. test

B. error

C. myObject::CONSTANT

D. no output

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

You can do it
  1. Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  2. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  3. What will be the output of the following PHP code ? <?php $i = 0;while (++$i && --$i){ print $i;}…
  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 define(NEW_GOOD_NAME_CONSTANT, I have a…
  6. Which one of the following is the default PHP session name?
  7. What is the default time(in seconds) for which session data is considered valid?
  8. Which function displays the web pages most recent modification date?
  9. What will be the output of the following code? If say date is 22/06/2013. <?php echo Today is .date(F…
  10. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  11. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  12. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;echo $color1…
  13. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  14. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  15. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  16. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  17. What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  18. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  19. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  20. How many ways can a session data be stored?
  21. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  22. Which one of the following is the very first task executed by a session enabled page?
  23. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  24. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  25. What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  26. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  27. Say you want to calculate the date 45 days from the present date which one of the following statement…
  28. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  29. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  30. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…