php cert quizzes Flashcards

1
Q

What does PHP stand for?

A. PHP: Hypertext Preprocessor

B. Private Home Page

C. Personal Hypertext Processor

A

A. PHP: Hypertext Preprocessor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PHP server scripts are surrounded by delimiters, which?

A. …?>

B. …&>

C. …

D.

A

D.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you write “Hello World” in PHP

A. echo “Hello World”;

B. Document.Write(“Hello World”);

C. “Hello World”;

A

A. echo “Hello World”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

All variables in PHP start with which symbol?

A. !

B. $

C. &

A

B. $

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the correct way to end a PHP statement?

A. ;

B. .

C.

D. New line

A

A. ;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The PHP syntax is most similar to:

A. Perl and C

B. JavaScript

C. VBScript

A

A. Perl and C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A. $_GET[];

B. Request.QueryString;

C. Request.Form;

A

A. $_GET[];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When using the POST method, variables are displayed in the URL:

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In PHP you can use both single quotes ( ‘ ‘ ) and double quotes ( “ “ ) for strings:

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Include files must have the file extension “.inc”

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the correct way to include the file “time.inc” ?

A.

B.

C.

D.

A

A.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the correct way to create a function in PHP?

A. function myFunction()

B. new_function myFunction()

C. create myFunction()

A

A. function myFunction()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the correct way to open the file “time.txt” as readable?

A. fopen(“time.txt”,”r”);

B. open(“time.txt”);

C. open(“time.txt”,”read”);

D. fopen(“time.txt”,”r+”);

A

A. fopen(“time.txt”,”r”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

PHP allows you to send emails directly from a script

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which superglobal variable holds information about headers, paths, and script locations?

A. $GLOBALS

B. $_SESSION

C. $_GET

D. $_SERVER

A

D. $_SERVER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the correct way to add 1 to the $count variable?

A. $count =+1

B. count++;

C. ++count

D. $count++;

A

D. $count++;

17
Q

What is a correct way to add a comment in PHP?

A.

B. *...*

C. …

D. //

A

D. //

18
Q

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True or False

A

True

19
Q

The die() and exit() functions do the exact same thing.

True or False

A

True

20
Q

Which one of these variables has an illegal name?

A. $myVar

B. $my_Var

C. $my-Var

A

C. $my-Var

21
Q

How do you create a cookie in PHP?

A. setcookie()

B. makecookie()

C. createcookie

A

A. setcookie()

22
Q

In PHP, the only way to output text is with echo.

True or False

A

False

23
Q

How do you create an array in PHP?

A. $cars = array(“Volvo”, “BMW”, “Toyota”);

B. $cars = “Volvo”, “BMW”, “Toyota”;

C. $cars = array[“Volvo”, “BMW”, “Toyota”];

A

A. $cars = array(“Volvo”, “BMW”, “Toyota”);

24
Q

The if statement is used to execute some code only if a specified condition is true

True or False

A

True

25
Q

Which operator is used to check if two values are equal and of same data type?

A. ===

B. !=

C. ==

D. =

A

A. ===

26
Q

What does SQL stand for?

A. Structured Query Language

B. Structured Question Language

C. Strong Question Language

A

A. Structured Query Language

27
Q

Which SQL statement is used to extract data from a database?

A. SELECT

B. GET

C. OPEN

D. EXTRACT

A

A. SELECT

28
Q

Which SQL statement is used to update data in a database?

A. UPDATE

B. SAVE AS

C. SAVE

D. MODIFY

A

A. UPDATE