wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PHP Module 1 Unit Test

Total questions: 15

Worksheet time: 9mins

Name
Class
Date
1.

PHP is a _______________________ language commonly used for web applications.

a)

Server Side Scripting Language

b)

Client Side Scripting Language

c)

Programming Language

d)

UI Development Programming

2.

Which method is more secure GET and POST method ?

a)

GET

b)

POST

3.

Trace the odd data type?

a)

float

b)

integer

c)

double

d)

real number

4.

When defining identifier in PHP you should remember that ?

a)

Identifier are case sensitive. So $result is different than $ result

b)

Identifiers can be any length

c)

Both of above

d)

None of above

5.

Identify the invalid identifier ?

a)

my-function

b)

size

c)

-some word

d)

This&that

6.

Which of following are compound data type?

a)

Array

b)

Object

c)

Both of Above

d)

None of the Above

7.

The output of following script would be

$somerar=15;

function addit () {

GLOBAL $somevar;

$somerar++ ;

echo "somerar is $somerar";

}

addit ();

a)

somerar is 15

b)

somerar is 16

c)

somerar is 1

d)

somerar is $ somerar

8.

Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is: ?

a)

Local

b)

function parameter

c)

static

d)

None of above

9.

The ___________ function can be used to compare two strings using a case-insensitive binary algorithm ?

a)

strcmp()

b)

stricmp()

c)

strcasecmp()

d)

stristr()

10.

How do you get information from a form that is submitted using the "get" method?

a)

$_GET[];

b)

Request.Form;

c)

Request.Query String;

d)

$_POST[];

11.

PHP code is embedded directly into XHTML document?

a)

Yes

b)

No

12.

Which of the following function is used to pick one or more random values from PHP Array?

a)

array_random()

b)

Rand_array()

c)

array_rand()

d)

Random_array()

13.

PHP variables are_____ ?

a)

Multitype variables

b)

Single type variable

c)

Double type variables

d)

Triple Type Variable

14.

Father of PHP?

a)

Larry Wall

b)

Rasmus Lerdorf

c)

James Gosling

d)

Guido Van Rossum

15.

Full form of PHP.

a)

PreHypertextProcessor

b)

Hypertext Preprocessor

c)

Hypertext Postprocessor

d)

PostHypertextProcessor