Lesson 2 (MIDTERM) Flashcards

(18 cards)

1
Q

The real power of PHP comes from its ________

A

functions

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

PHP has over___________ that can be called directly, within script, to perform a specific task.

A

1000 built-in functions

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

is a block of statements that can be used repeatedly in a program.

A

Functions

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

will not execute automatically when a pageloads.

A

Functions

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

will be executed by a call to the function.

A

Function

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

A user-defined _______ declaration starts with the keyword function, followed by the name of the function followed by () {}

A

Function

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

To call the function, just write its name followed by ___________

A

parentheses()

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

To let a function return a value, use the __________

A

return statement

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

takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement

A

Include (or require) statement

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

Including files is very useful when you want to include the same PHP,HTML,or text on multiple pages of a website.

A

Include and Require Statements

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

It is possible to insert the content of one PHP file into another PHP file (before the server executes it), with the _______ or _________ statement.

A

Include and Require Statements

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

Including files saves a lot of work. This means that you can create a standard header, footer, or menu file for all your webpages. Then, when the header needs to be updated, you can only update the header include file.

A

Include and Require Statements

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

will produce a fatal error (E_COMPILE_ERROR) and stop the script

A

Require Statement

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

will only produce a warning (E_WARNING) and the script will continue

A

Include Statement

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

Use _______ when the file is required by the application.

A

Require

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

Use ______ when the file is not required and application should continue when file is not found.

16
Q

is used to embed PHP code from another file. If the file is not found, a warning is shown and the program continues to run. If the file was already included previously, this statement will not include it again.

17
Q

is used to embed PHP code from another file. If the file is not found, a fatal error is thrown and the program stops. If the file was already included previously, this statement will not include it again.