Home

What will be the output of the following PHP code ?
 <?php  define(NEW_GOOD_NAME_CONSTANT, I have a value);
define(OLD_BAD_NAME_CONSTANT, NEW_GOOD_NAME_CONSTANT);
echo NEW_GOOD_NAME_CONSTANT;
echo OLD_BAD_NAME_CONSTANT;
?>

A. I have a value

B. I have a valueI have a value

C. ERROR

D. I have a valueNEW_GOO_NAME_CONSTANTS

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

You can do it
  1. What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  2. If session.use_cookie is set to 0, this results in use of..
  3. PHP files have a default file extension of..
  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 define(__LINE__, PHP is a scripting language);echo…
  6. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  7. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  8. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  9. A PHP script should start with ___ and end with ___:
  10. What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  11. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  12. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  13. What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  14. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  15. What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  16. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  17. What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  18. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  19. The date() function returns ___ representation of the current date and/or time.
  20. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  21. What is the default time(in seconds) for which session data is considered valid?
  22. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  23. Say you want to calculate the date 45 days from the present date which one of the following statement…
  24. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  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 = 1;echo $color1…
  27. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  28. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  29. Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  30. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…