Home

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

A. 00000000000000000000….infinitely

B. -1-1-1-1-1-1-1-1-1-1…infinitely

C. no output

D. error

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

You can do it
  1. Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  2. Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  3. What is the default time(in seconds) for which session data is considered valid?
  4. What is the default number of seconds that cached session pages are made available before the new pages…
  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. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  7. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  8. Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  9. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;echo $color1…
  10. What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  11. What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  12. What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  13. What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  14. What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  15. What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  16. What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  17. Which one of the following format parameter can be used to identify timezone?
  18. What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  19. What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  20. What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  21. What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  22. If the format is F then which one of the following will be returned?
  23. What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  24. Say you want to calculate the date 45 days from the present date which one of the following statement…
  25. What will be the output of the following PHP code ? <?php class Constants{ define('MIN_VALUE', '0.0');define('MAX_VALUE',…
  26. Which one of the following is the very first task executed by a session enabled page?
  27. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  28. PHP files have a default file extension of..
  29. What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  30. What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language,…