Home
Subscribe TechModgy to learn about new technologies!

What will be the output of the following PHP code?
 <?php   $fname = array(Peter, Ben, Joe);
$age = array(35, 37, 43);
$c = array_combine($fname, $age);
print_r($c);
?>

A.

Array ( Peter Ben Joe )

B.

Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

C.

Array ( 35 37 43 )

D.

Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • 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 class myObject { }define('myObject::CONSTANT',…
  • What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  • What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  • 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 $i = 0;while (++$i && --$i){ print $i;}…
  • The date() function returns ___ representation of the current date and/or time.
  • Say you want to calculate the date 45 days from the present date which one of the following statement…
  • To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  • 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 $i = 0;while(++$i || --$i){ print $i;}…
  • What will be the output of the following PHP code ? <?php /*echo Hello world;*/ ?>
  • Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  • If the format is F then which one of the following will be returned?
  • Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  • How many ways can a session data be stored?
  • What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  • What will be the output of the following PHP code ? <?php define(GREETING, PHP is a scripting language);echo…
  • What will be the output of the following PHP code ? <?php define('IF', 42);echo IF: , IF;?>
  • Which one of the following is the default PHP session name?
  • 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 $color1 = 1;$color2 = 1;echo $color1 +…
  • 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 = 5;while (--$i > 0){ $i++;print $i;print…
  • 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 $i = 0;while ((--$i > ++$i) - 1){ print…
  • -->

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