wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

php interview

Total questions: 23

Worksheet time: 12mins

Name
Class
Date
1.

Which tag is used for php

a)

<?php

?>

b)

<style>

c)

<php ?>

d)

<php

/php>

2.

$a=array(10=>"Jimmy",20=>"mummy");

Is an example of

a)

Sequence array

b)

Indexed array

c)

Associative array

d)

None

3.

In php the keyword to be used before function name is

a)

Function

b)

Static

c)

function

d)

FUNCTION

4.

<?php

function add()

{

global $a=10;

echo $a;

}

add();

$a+=10;

?>

Output is

a)

10

b)

15

c)

20

d)

30

5.

$a="deepan";

$b="Deepan";

if(strcmp($a,$b))

{

echo "equal";

}

else{

echo " not equal";}

Output is

a)

Equal

b)

Not equal

c)

Error

d)

None

6.

$a="IT is favorite department";

$b=sub_string($a,"bes",7,14);

echo $b;

Output is

a)

IT is best department

b)

IT is bes department

c)

Error

d)

IT is favorite department

7.

1. ____________ is a concept that stores more than one value of same data type

a)

Class

b)

Array

c)

structure

d)

function

8.

2. Each element of line array is assigned on index values which commence from _________ .

a)

-1

b)

1

c)

0

d)

n-1

9.

3. A __________ dimensional array is an array containing one or more arrays.

a)

associate

b)

indexed

c)

single

d)

multi

10.

4. They are __________ types of array concepts in PHP.

a)

3

b)

4

c)

2

d)

many

11.

PHP arrays are using ________ looping concepts

a)

do..while

b)

while

c)

switch

d)

Foreach

12.

Name the function is used to create array in PHP?

(a)  

13.

Array index values always begins with (a)  

14.

____ operator separate key and value pair.

a)

.

b)

[ ]

c)

=>

d)

->

15.
What does HTML stand for?
a)
Hypertext Making Language
b)
Hyper Transfer Markup Language
c)
Hypertext Markup Language
d)
Hyper Transfer Making Language
16.
HTML Language uses
a)
Tabs
b)
Tags
c)
Punctuation
d)
Quotations
17.
<p> is
a)
punctuation tag
b)
closing paragraph tag
c)
closing punctuation tag
d)
paragraph tag
18.

HTML stands for...

a)

Hyper Time Multiple Language

b)

Hyper Text Mark-up Language

c)

Hippo T-Rex Mascot Lemur

d)

Hipper Text Make Language

19.

Which is the proper way to write an h1 tag

a)

<h1>Hello</h1>

b)

<h1>"Hello

c)

{h1}Hello{/h1}

d)

<h1>Hello<h1>

20.

What should a HTML web page start with?

a)

<b>

b)

<li>

c)

<html>

d)

<start>

21.

CSS stands for...

(a)  

22.

what is syntax of while loop

a)

do {  code to be executed;} while (condition is true);

b)

while(condition) { statement(s); }

c)

for (init counter; test counter; increment counter) {  code to be executed for each iteration;}

d)

foreach ($array as $value) {  code to be executed;}

23.

Use the correct function to output the number of items in an array.

$fruits = array("Apple", "Banana", "Orange");

echo

(a)