wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DTS VSGA - PHP FEEDBACK QUIZ

Total questions: 20

Worksheet time: 3mins

Name
Class
Date
1.

PHP is.....

a)

a server scripting language, and a powerful tool for making dynamic and interactive Web pages.

b)

a backend scripting language, and a powerful tool for making dynamic and interactive Web pages.

c)

a dynamic scripting language, and a powerful tool for making dynamic and interactive Web pages.

d)

a static scripting language, and a powerful tool for making dynamic and interactive Web pages.

2.

PHP files can contain....

a)

text, HTML, CSS, JavaScript, and PHP code

b)

rows, HTML, CSS, JavaScript, and PHP code

c)

text, column, rows, table, HTML, CSS, JavaScript, and PHP code

d)

table, text, HTML, CSS, JavaScript, and PHP code

3.

What Can PHP Do?....

a)

PHP can generate dynamic page content

b)

PHP can create, open, read, write, delete, and close files on the server

c)

PHP can collect form data

d)

All Answers are correct

4.

<?php

$txt = "PHP";

echo "I love $txt!";

?>


the result is......

a)

I love PHP!

b)

I love PHP

c)

I Love PHP!

d)

I Love PHP

5.

Which folder you should save your php project...

a)

htdocs

b)

htacces

c)

http

d)

xampp

6.

PHP has three different variable scopes:.....

a)

local

b)

global

c)

static

d)

All answers are correct

7.

if...else statement used for

a)

executes some code if a condition is true and another code if that condition is false

b)

executes some code if one condition is true

c)

executes different codes for more than two conditions

d)

selects one of many blocks of code to be executed

8.

With PHP, there are two basic ways to get output:...

a)

echo and print

b)

echo and select

c)

echo and print.out

d)

echo and println

9.

A comment in PHP code is.....

a)

a line that is not executed as a part of the program

b)

a line that is an executed as a part of the program

c)

a line that is in executed as a part of the program

d)

a line that is out executed as a part of the program

10.

PHP supports the following data types:...

a)

String, Integer, Float (floating point numbers - also called double), Boolean, Array, Object, NULL, Resource

b)

String, Integer, Float (floating point numbers - also called double), Boolean, Array, Object, NULL

c)

String, Integer, Float (floating point numbers - also called double), Boolean, Array, Object, Resource

d)

String, Integer, Float (floating point numbers - also called double), Boolean, Array, NULL, Resource

11.

What is SQL?

a)

SQL stands for Structured Query Language

b)

SQL lets you access and manipulate databases

c)

SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987

d)

All answers are correct

12.

A FOREIGN KEY is....

a)

a key used to join one tables together.

b)

many keys used to link two tables together.

c)

a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table

d)

many field (or collection of fields) in one table that refers to the PRIMARY KEY in another table

13.

Untuk menerim data/informasi yang dikirim dari form menggunakan metode GET adalah?

a)

$_GET

b)

$_POST

c)

$_GLOBAL

d)

$_VAR

14.

function SetNilai( $nilai= 50) {

echo $nilai;

}

SetNilai();


Program diatas akan menghasilkan output?

a)

0

b)

Null

c)

50

d)

Sintax Error

15.

for ($x = 1; $x < 10; $x++) {

echo $x." ";

}


Kode tersebut menghasilkan output?

a)

1 2 3 4 5 6 7 8 9 10

b)

1 2 3 4 5 6 7 8 9

c)

Tidak menampilkan output karena kondisi tidak terpenuhi

d)

Mengalami error syntax

16.

Setiap variabel di PHP diawali dengan simbol?

a)

#

b)

$

c)

%

d)

*

17.

Untuk membuat komentar di PHP menggunakan tanda?

a)

//

b)

/*

c)

%

d)

$

18.

$a=5;

switch ($a){

case 1 : echo 1;break;

case 2 : echo 2;break;

case 3 : echo 3;break;

default : echo 4;

}


Program diatas menghasilkan output?

a)

1

b)

2

c)

3

d)

4

19.

Fungsi/method untuk membuat enskripsi di PHP adalah?

a)

number_format()

b)

md5()

c)

ltrim()

d)

date()

20.

Kode PHP diawali dan di akhiri dengan tanda?

a)

<?php … </?php>

b)

<script> … </script>

c)

<?php … ?>

d)

<php … /?>