Home

What will be the output of the following PHP code ?
 <?php  $i = 5;
while (--$i > 0 || ++$i){ print $i;
} ?>

A. 54321111111….infinitely

B. 555555555…infinitely

C. 54321

D. 5

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 $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  2. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 || ++$i){ print…
  3. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  4. Which one of the following is the very first task executed by a session enabled page?
  5. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  6. What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  7. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…
  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 define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  10. Which one of the following format parameter can be used to identify timezone?
  11. Which function displays the web pages most recent modification date?
  12. What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  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 define(VAR_NAME,test);${VAR_NAME} = value;echo…
  15. Say you want to calculate the date 45 days from the present date which one of the following statement…
  16. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0){ $i++;print $i;print…
  17. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  18. Which one of the following function is used to start a session?
  19. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  20. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  21. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  22. What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  23. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  24. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  25. What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  26. What will be the output of the following PHP code ? <?php define(__LINE__, PHP is a scripting language);echo…
  27. What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  28. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  29. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  30. What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…