Home

What will be the output of the following PHP code ?
 <?php  $color1 = 1;
$color2 = 1;
echo $color1 + $color2;
?>

A. 11

B. 2

C. 0

D. 1

0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • How many ways can a session data be stored?
  • What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  • What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  • 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 $color1 = red;$color2 = green;echo $color1…
  • If session.use_cookie is set to 0, this results in use of..
  • Which one of the following is the default PHP session name?
  • What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  • 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? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  • Which function displays the web pages most recent modification date?
  • What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  • Which one of the following is the very first task executed by a session enabled page?
  • 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 $age = array(Peter=>35, Ben=>37, Joe=>43);print_r(array_change_key_case($age,…
  • What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  • Which one of the following function is useful for producing a timestamp based on a given date and time.
  • What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  • Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  • Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  • What is the default time(in seconds) for which session data is considered valid?
  • What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  • What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');?>…
  • 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? If say date is 22/06/2013. <?php printf( date(t)…
  • 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 $i = 5;while (--$i > 0 && ++$i){ print…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  • -->

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