wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

WT Slip Test - 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What type of language is PHP

a)

Client Side

b)

Server Side

c)

Browser Side

d)

Web Side

2.

PHP is executed on

a)

The Server

b)

The Browser

c)

The Website

d)

The Machine

3.

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

4.

What is a integer?

a)

It's a Whole Number

b)

It's a Decimal Number

c)

It's a True or False Declaration

d)

It's a String of Text

5.

$colours = array("black, blue, Red, Green") - How do I access "Red" ?

a)

$colours[0];

b)

$colours[2];

c)

$colours[1]

d)

$colours[3];

6.

Which one of the following statements is used to create a table?

a)

CREATE TABLE table_name (column_type column_name);

b)

CREATE table_name (column_type column_name);

c)

CREATE TABLE table_name (column_name column_type);

d)

CREATE table_name (column_name column_type);

7.

Which of the following is the correct way to create a function in PHP?

a)

Create myFunction()

b)

New_function myFunction()

c)

function myFunction()

d)

None of the above

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 below symbols is a newline character?

a)

<br>

b)

\n

c)

/n

d)

\r

10.

Which of the following is the correct way to create an array in PHP?

a)

$season = array["summer" , "winter" , "spring" , "autumn"];

b)

$season = array("summer" , "winter" , "spring" , "autumn");

c)

$season =( "summer" , "winter" , "spring" , "autumn");

d)

All of the above