Home
Subscribe TechModgy to learn about new technologies!

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

A. 5

B. 555555555…infinitely

C. 54321

D. error

0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  • What will be the output of the following PHP code ? <?php $i = ;while ($i = 10){ print hi;}print…
  • What will be the output of the following PHP code ? <?php $color = red;$color = green;echo $color;?>…
  • The date() function returns ___ representation of the current date and/or time.
  • What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  • What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  • What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota);echo I…
  • What will be the output of the following PHP code? <?php $a = array(A, Cat, Dog, A, Dog);print_r(array_count_values($a));?>…
  • What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  • 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,…
  • Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  • What will be the output of the following PHP code ? <?php define('GREETING_TEST', 'PHP is a scripting…
  • What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  • What is the default number of seconds that cached session pages are made available before the new pages…
  • If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
  • What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  • What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  • If session.use_cookie is set to 0, this results in use of..
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  • What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  • What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  • What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  • -->

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