Home

What will be the output of the following PHP code ?
 <?php  define(__LINE__, PHP is a scripting language);
echo __LINE__;
?>

A. PHP is a scripting language

B. __LINE__

C. 2

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 define(NEW_GOOD_NAME_CONSTANT, I have a…
  2. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  3. The date() function returns ___ representation of the current date and/or time.
  4. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  5. 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,…
  6. Which one of the following is the default PHP session name?
  7. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  8. Which one of the following is the very first task executed by a session enabled page?
  9. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  10. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  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 $i = ;while ($i = 10){ print hi;}print…
  13. A PHP script should start with ___ and end with ___:
  14. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  15. What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  16. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  17. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  18. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  19. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  20. What will be the output of the following code? If say date is 22/06/2013. <?php echo Today is .date(F…
  21. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  22. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  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 $i = 2;while (++$i){ while (--$i > 0) print…
  25. Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  26. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  27. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  28. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  29. What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  30. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This