My Untitled Deck Flashcards

my desc objectives (29 cards)

1
Q
  1. ghg
  2. khj
    * 3.

**

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

What does the ‘die()’ function do in PHP?

A

Outputs a message and terminates the script.

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

True or False: PHP has built-in support for JSON.

A

True

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

What is the purpose of the ‘foreach’ loop in PHP?

A

To iterate over arrays.

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

Fill in the blank: In PHP, the ___ operator is used for comparison.

A

== or ===

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

Which PHP function is used to escape special characters in a string for use in SQL statements?

A

mysqli_real_escape_string()

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

What is a PHP session?

A

A way to store information about the user across multiple pages.

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

Which control structure in PHP is used for conditional execution?

A

if statement

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

What is the difference between ‘include’ and ‘require’ in PHP?

A

‘include’ will emit a warning if the file is not found, while ‘require’ will emit a fatal error.

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

What is the purpose of the ‘echo’ and ‘print’ statements in PHP?

A

To output data to the browser.

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

True or False: PHP can interact with various database systems.

A

True

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

What does the ‘isset()’ function do in PHP?

A

Checks if a variable is set and is not NULL.

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

Fill in the blank: The ___ statement is used to create a loop that executes a block of code a specified number of times.

A

for

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

Which PHP function is used to get the length of a string?

A

strlen()

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

What is the default file extension for PHP files?

A

.php

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

ss What operator is used for concatenation in PHP?

17
Q

What is the purpose of the ‘mysqli’ extension in PHP?

A

To access MySQL databases.

18
Q

True or False: PHP supports object-oriented programming.

19
Q

What type of data structure is an associative array in PHP?

A

A collection of key-value pairs.

20
Q

Which PHP function is used to start a session?

A

session_start()

21
Q

What is the correct way to start a PHP block?

22
Q

Fill in the blank: In PHP, arrays can be indexed using ___ keys.

A

numeric or associative

23
Q

What is the purpose of the ‘require’ statement in PHP?

A

To include and evaluate a specified file.

24
Q

Which function is used to output data to the screen in PHP?

25
True or False: PHP can be embedded into HTML.
True
26
What symbol is used to denote a variable in PHP?
$
27
Is PHP a server-side or client-side scripting language?
Server-side
28
What does PHP stand for?
PHP: Hypertext Preprocessor
29
my question
my answer