wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ITMajor1 & IntroSoftEng- Prelim Examination

Total questions: 20

Worksheet time: 42mins

Name
Class
Date
1.

What is PHP ?

a)

is a general-purpose scripting language geared toward web development.

b)

s a digital electronic machine that can be programmed to carry out sequences of arithmetic or logical operations automatically.

c)

Both A and B

d)

None of the Above

2.

PHP stands for ?

a)

PHP: Hypertext Preprocessor

b)

PHP: Hypertext Preprocesor

c)

PHP: Hypertext Preproccessor

d)

PHP: Hypertext Priprocessor

3.

PHP files can contain _____ code

a)

HTML

b)

CSS

c)

JavaScript

d)

All of the Above

4.

PHP code is executed on the server, and the result is returned to the browser as plain ________

a)

HTML

b)

Text

c)

Code

d)

All of the Above

5.

What will be the PHP files extension ?

a)

.py

b)

.php

c)

Both A and B

d)

None of the Above

6.

PHP can generate (a)   page content

7.

A PHP scripts starts with _____ and ends with ______

(a)  

8.

PHP script that uses a built-in PHP function " (a)   " to output the text "Hello World!" on a web page:

9.

PHP statements end with a (a)   .

10.

A (a)   in PHP code is a line that is not executed as a part of the program. Its only purpose is to be read by someone who is looking at the code.

11.

What is the syntax for single-line comments for PHP?

(a)  

12.

What is the Syntax for multiple-line comments in PHP ?

(a)  

13.

In PHP, a variable starts with the (a)   sign, followed by the name of the variable:

14.

Insert the missing part of the code below to output "Hello World".

(a)  

15.

Write the correct opening tag and close tag for PHP scripts.

(a)  

16.

Create a variable named txt and assign the value "Hello".

(a)  

17.

Create one variable named x, and one variable named y, then use the echo statement to output the sum of x and y.

(a)  

18.

Get the length of the string "Hello World!".

(a)  

19.

Reverse the string "Hello World!".

(a)  

20.

Multiply 10 with 5, and output the result.

(a)