wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PHP Introduction - Assignment 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

PHP stands for -

a)

Hypertext Preprocessor

b)

Pretext Hypertext Preprocessor

c)

Personal Home Processor

d)

None of the above

2.

Who is known as the father of PHP?

a)

Drek Kolkevi

b)

List Barely

c)

Rasmus Lerdrof

d)

None of the above

3.

Variable name in PHP starts with

a)

! (Exclamation)

b)

$ (Dollar)

c)

& (Ampersand)

d)

# (Hash)

4.

Which of the following is the default file extension of PHP?

a)

.html

b)

.php

c)

.hphp

d)

.xml

5.

Which of the following is correct to add a comment in php?

a)

& …… &

b)

// ……

c)

/* …… */

d)

Both (b) and (c)

6.

Which of the following is used to display the output in PHP?

a)

echo

b)

write

c)

print

d)

Both (a) and (c)

7.

Which of the following is used for concatenation in PHP?

a)

+ (plus)

b)

* (Asterisk)

c)

. (dot)

d)

append()

8.

Which of the following is the correct way of defining a variable in PHP?

a)

$variable name = value;

b)

$variable_name = value;

c)

$variable_name = value

d)

$variable name as value;

9.

Which of the following is used to end a statement in PHP?

a)

. (dot)

b)

; (semicolon)

c)

! (exclamation)

d)

/ (slash)

10.

What will be the output of the following program?


<?php $var1 = "Hello"; $var2 = "World"; echo "$var1$var2"; ?>

a)

HelloWorld

b)

"$var1$var2"

c)

Hello World

d)

None of the above