wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PHP TEST 2

Total questions: 20

Worksheet time: 17mins

Name
Class
Date
1.

What does PHP stand for?

(a)  

2.

PHP server scripts are surrounded by delimiters, which?

a)
b)
c)
3.

How do you write "Hello World" in PHP

(a)  

4.

All variables in PHP start with which symbol?

(a)  

5.

What is the correct way to end a PHP statement?

(a)  

6.

The PHP syntax is most similar to

a)

Java script

b)

PERL and C

c)

Visual Basic

d)

VB Script

7.

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

a)

True

b)

False

8.

Include files must have the file extension

(a)  

9.

the correct HTML element for the largest heading is:

(a)  

10.

What is the correct HTML element for inserting a line break?

(a)  

11.

Which of the following array represents an array with strings as index?

a)

Numeric Array

b)

Associative Array

c)

Multidimentional Array

12.

CSS Stand for

(a)  

13.

loops through a block of code for each element in an array

(a)  

14.

executes some code if a condition is true and another code if that condition is false

(a)  

15.

Basic PHP Syntax

(a)  

16.

What are the two types of array in php

a)

Indexed, sequence

b)

Associative, sequence

c)

Indexed, associative

d)

None

17.

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

Is an example of

a)

Sequence array

b)

Indexed array

c)

Associative array

d)

None

18.

It is a server programming language and a powerful tool for creating dynamic and interactive web pages.

a)

XAMPP

b)

PHP

c)

HTML

19.

A variable can have a short name (like x or y) or a more descriptive name (age, name, volume_total)

a)

true

b)

false

20.

You can have local variables with the same name in different functions, because local variables are only recognized by the function in which they are declared

a)

true

b)

false