Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PHP QUIZ

Total questions: 14

Worksheet time: 8mins

Name
Class
Date
1.

PHP Stands for

a)

Personal Home Page

b)

Hypertext processor

c)

Project Heading Page

d)

processor Hypertext programming

2.

PHP is

a)

Server side scripting

b)

Client side scripting

3.

Trace the output

$a = 10;

$A= 25

ECHO "".$a;

(a)  

4.

Which method is more secure send the data to server

a)

post

b)

get

c)

request

d)

none

5.

PHP is executed on

a)

The Server

b)

The Browser

c)

The Website

d)

The Machine

6.

We create re-usable code blocks by placing them inside?

a)

Variables

b)

Parameters

c)

Code Blocks

d)

Functions

7.

Sometimes we only want certain code to execute if a condition is true. How do we test for that?

a)

Loop

b)

If Statement

c)

Integer

d)

Variable

8.

What if we want a block of code to execute several times?

a)

Use a Variable

b)

Use a Function

c)

Use a Loop

d)

Use a Leap

9.

How do I print out the values of the variable "name" ?

a)

$name;

b)

include $name;

c)

echo $name;

d)

echo $name

10.

In an IF statement we can have 2 conditions tested. Which keyword allows this?

a)

Else

b)

if Else

c)

Else if

d)

OR

11.

Which of the following are comparison operators in PHP?

A. ==

B. !=

C. ===

D. <

a)

A and B

b)

C and D

c)

A,B and C

d)

A,B,C and D

12.

What is the Output?

<?php

#echo "Hello World"

echo "#Hello World";

?>

a)

Hello World #Hello World

b)

Hello World

c)

#Hello World

d)

Error

13.

What is the Output


<?php

$color=red;

echo "$color";

?>

a)

red

b)

$color

c)

No answer

d)

Error

14.

All variables in PHP start with which symbol?

a)

?

b)

$

c)

!

d)

=