• PHP Video Tutorials

PHP Mock Test



This section presents you various set of Mock Tests related to PHP. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

PHP Mock Test I

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Q 7 - Is PHP whitespace sensitive?

A - false

B - true

Answer : A

Explanation

false! PHP is whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters.

Q 8 - Is PHP case sensitive?

A - false

B - true

Answer : B

Explanation

true! PHP is a case sensitive language.

Q 11 - Which of the following type of variables are whole numbers, without a decimal point, like 4195?

A - Integers

B - Doubles

C - Booleans

D - Strings

Answer : A

Explanation

Integers: are whole numbers, without a decimal point, like 4195.

Q 12 - Which of the following type of variables are floating-point numbers, like 3.14159 or 49.1?

A - Integers

B - Doubles

C - Booleans

D - Strings

Answer : B

Explanation

Doubles: are floating-point numbers, like 3.14159 or 49.1.

Q 13 - Which of the following type of variables have only two possible values either true or false?

A - Integers

B - Doubles

C - Booleans

D - Strings

Answer : C

Explanation

Booleans: have only two possible values either true or false.

Q 14 - Which of the following type of variables are special type that only has one value: NULL?

A - Strings

B - Doubles

C - Booleans

D - NULL

Answer : D

Explanation

NULL: is a special type that only has one value: NULL.

Q 15 - Which of the following type of variables are sequences of characters, like 'PHP supports string operations.'?

A - Strings

B - Arrays

C - Objects

D - Resources

Answer : A

Explanation

Strings: are sequences of characters, like 'PHP supports string operations.'

Q 16 - Which of the following type of variables are named and indexed collections of other values?

A - Strings

B - Arrays

C - Objects

D - Resources

Answer : B

Explanation

Arrays: are named and indexed collections of other values.

Q 17 - Which of the following type of variables are instances of programmer-defined classes?

A - Strings

B - Arrays

C - Objects

D - Resources

Answer : C

Explanation

Objects: are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class.

Q 18 - Which of the following type of variables are special variables that hold references to resources external to PHP (such as database connections)?

A - Strings

B - Arrays

C - Objects

D - Resources

Answer : D

Explanation

Resources: are special variables that hold references to resources external to PHP (such as database connections).

Answer : D

Explanation

All of the above options are correct.

Answer : C

Explanation

Both of the above options are correct.

Answer : C

Explanation

Both of the above options are correct.

Answer : C

Explanation

Both of the above options are correct.

Answer Sheet

Question Number Answer Key
1 D
2 D
3 D
4 D
5 C
6 C
7 A
8 B
9 D
10 D
11 A
12 B
13 C
14 D
15 A
16 B
17 C
18 D
19 D
20 D
21 D
22 C
23 C
24 C
25 C
php_questions_answers.htm
Advertisements