wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Module 1 - Short Quiz

Total questions: 25

Worksheet time: 11mins

Name
Class
Date
1.

All variable declaration in PHP starts with which symbol?

a)

$

b)

@

c)

&

d)

?

e)

#

2.

The following are client-side web tools use in web development except ONE.

a)

PHP

b)

HTML

c)

CSS

d)

JavaScript

3.

What does PHP stand for?

a)

PHP Hypertext Preprocessor

b)

PHP Hypertext Processor

c)

Protocol Hypertext Preprocessor

d)

Page Hypertext Preprocessor

4.

PHP is considered as a both client-side and server-side scripting language?

a)

False

b)

True

5.

Given the sample code snippet shown in the image, what is the expected output?

a)

bool(true)

b)

boolean(true)

c)

bool(false)

d)

boolean(false)

6.

How do you write or display "Mahal Kong NVSU" in PHP on a web page?

Select all the possible answers to get the perfect score.

a)

echo ('Mahal Kong NVSU');

b)

print "Mahal Kong NVSU";

c)

echo "Mahal Kong NVSU";

d)

echo (Mahal Kong NVSU);

e)

print Mahal Kong NVSU;

7.

Which of the following PHP statement/statements will store number 1,309 in variable named "num_base"?

a)

$num_base = 1309;

b)

int num_base = 1309;

c)

int $base = 1309;

d)

num_base = 1309;

8.

What symbol or character name is use to end a statement in PHP just like when using the echo or print statements?

(a)  

9.

Which is the correct way to insert a multiple line PHP comment?

a)

/* This is a comment */

b)

# This is a comment #

c)

// This is a comment /

d)

// This is a comment

e)

<!-- This is a comment -->

10.

You always a need a web server to execute or run PHP scripts?

a)

True

b)

False

11.

PHP scripts could be embedded or written inside an HTML document?

a)

True

b)

False

12.

The variables $BSIT, $bsit, and $Bsit are treated as the same variables in PHP?

a)

False

b)

True

13.

One rule in naming a variable in PHP states that it must start with a letter, a number, and an underscore ( _ ) ONLY.

a)

False

b)

True

14.

Variables in PHP are case-insensitive just like names of keywords and functions.

a)

True

b)

False

15.

In PHP you can use both single ( ' ' ) and double quotes ( " " ) to initialize string variables?

a)

True

b)

False

16.

Variables, keywords, function and classes names are not case-sensitive in PHP.

a)

False

b)

True

17.

This built-in function in PHP returns and prints the (a)   and value of a variable?

18.

This statement can be used as an alternative to echo statement in displaying output to the browser.

(a)  

19.

There are 8 primitive data types available in PHP. Which of the following are not data types?
Select all possible answers to get the perfect score.

a)

Character

b)

Long

c)

Byte

d)

Integer

e)

Boolean

20.

Which of the following are incorrect or invalid variable names in PHP?

Select all possible answers to get the perfect score.

a)

$value_of perimeter

b)

$1_kilometer_per

c)

$percent_value%

d)

$area_of_triangle

e)

$ready_set_go123

21.

Determine if the following statement is correct: define("VALUE OF PI", 3.1416);

a)

False

b)

True

22.

How may arguments does the define() built-in function in PHP is needed when declaring a constant variable?

a)

2

b)

None

c)

1

d)

3

23.

Analyze the PHP code shown in the image. What is the possible output when executed?

a)

b)

None

c)

3

d)

e)

No OUTPUT because the are errors in the code.

24.

What is the name of the local host web server when you install XAMPP on your computer machine that actually executes or runs PHP scripts?
Please type in lower cases.

(a)  

25.

What is the name of the sub-directory inside the XAMPP directory where you have to put the root folder of your working PHP project?
Please type in lower cases.

(a)