PHP Flashcards

1
Q

What does PHP stand for?

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
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”;

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

$

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

;

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

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[];

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:

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:

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”

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
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()

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”);

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

A

True

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

What is the correct way to connect to a MySQL database?

A

mysqli_connect(host,username,password,dbname);

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++;

17
Q

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

A

//

18
Q

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

A

True

19
Q

In PHP, the die() and exit() functions do the exact same thing.

A

True

20
Q

Which one of these variables has an illegal name?

A

$my-Var