Home
Learn about new technologies!

What is the correct answer?

4

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

A. redgreen

B. red green

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…
  • What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  • 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 $color1 = red;$color2 = green;echo $color1.$color2;?>…
  • Neglecting to set which of the following cookie will result in the cookies domain being set to the host…
  • To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  • Which of the following must be installed on your computer so as to run PHP script?i) Adobe Dreamweaverii)…
  • What will be the output of the following PHP code ? <?php $i = 5;while (--$i > 0 && ++$i){ print…
  • How many ways can a session data be stored?
  • 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,…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  • 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 $color1 = 1;$color2 = 1;echo $color1 +…
  • What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  • PHP files have a default file extension of..
  • Say you want to calculate the date 45 days from the present date which one of the following statement…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;echo $color1…
  • What will be the output of the following PHP code? If say date is 22/06/2013. <?php printf( date(t)…
  • If session.use_cookie is set to 0, this results in use of..
  • Which one of the following function is used to start a session?
  • What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  • Which directive determines how the session information will be stored?
  • 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 $fname = array(Peter, Ben, Joe);$age = array(35,…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  • 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 $i = 2;while (++$i){ while (--$i > 0) print…
  • What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  • -->