M4 Flashcards

1
Q

used to declare constants

A

define()

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

can only be assigned a scalar value, like a string or a number

A

constant

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

T/F A constant’s value can still be changed.

A

False

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

You can separate your PHP file and embed it to your html by using PHP __________ functions

A

include

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

Includes and evaluates the specified file.
Generate a warning on failure message if file not found.

A

include

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

Performs the same way as the include function.
Generate a fatal error message if file not found stopping the script at that point.

A

require

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

Same as include function except it includes the file only once.

A

include_once

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

Same as require function except it includes the file only once.

A

require_once

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

Most of the developers used include functions for their ________ and _________

A

header, footer

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

You may write the file with an extension name of ________ rather than .php to serve as a fragment of your program code.

A

.inc

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

T/F In some scripts, a file might be included more than once, causing function redefinitions, variable reassignments, and
other possible problems.

A

True

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

function used to generate random integers

A

rand()

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

function that returns the next highest integer by rounding the value upwards

A

ceil()

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

function that returns the next lowest integer by rounding the value downwards

A

floor()

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

function that returns the smallest value

A

min()

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

function that returns the highest value

A

max()

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

function that formats a number (with grouped thousand)

A

number_format()

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

function that destroys the specified variable

A

unset

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

function that splits a string by string

A

explode

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

function that joins array elements to form a string

A

implode

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

function that returns the value length of a string

A

strlen

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

function that finds the position of the first occurrence of a substring in a given string

A

strpos

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

function that reverses a given string

A

strrev

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

function that converts string to lowercase

A

strtolower

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

function that converts string to uppercase

A

strtoupper

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

function that returns part of a given string

A

substr

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

function that makes a string’s first character uppercase

A

ucfirst()

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

converts string to uppercase*

A

ucwords()

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

stripped white spaces or other characters from the beginning and end of a string.

A

trim()

30
Q

strip white spaces or other characters from the beginning of a string

A

ltrim()

31
Q

strip white spaces or other characters from the end of a string

A

rtrim()

32
Q

strip HTML and PHP tags from a string

A

strip_tags()

33
Q

used to format a local time or date
returns a string formatted according to the given format string

A

date()

34
Q

Day of the month, 2 digits with leading zeros (01 - 31)

A

d

35
Q

A textual representation of a day, three letters (Mon - Sun)

A

D

36
Q

Day of the month without leading zeros (1 - 31)

A

j

37
Q

A full textual representation of the day of the week (Sunday - Saturday)

A

l

38
Q

ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0) (1 - 7)

A

N

39
Q

English ordinal suffix for the day of the month, 2 characters (st, nd, rd or th. Works
well with j)

A

S

40
Q

Numeric representation of the day of the week (0 - 6)

A

w

41
Q

The day of the year (starting from 0) (0 - 365)

A

z

42
Q

ISO-8601 week number of year, weeks starting on Monday (1 - 52)

A

W

43
Q

A full textual representation of a month (January - December)

A

F

44
Q

Numeric representation of a month, with
leading zeros (01 - 12)

A

m

45
Q

A short textual representation of a month, three letters (Jan - Dec)

A

M

46
Q

Numeric representation of a month, without leading zeros (1 - 12)

A

n

47
Q

Number of days in the given month (28 - 31)

A

t

48
Q

Whether it’s a leap year (0 / 1)

A

L

49
Q

ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (e.g. 1999, 2003)

A

o

50
Q

A full numeric representation of a year, 4 digits (e.g. 1999, 2003)

A

Y

51
Q

A two digit representation of a year (e.g. 99, 03)

A

y

52
Q

Lowercase Ante meridiem and Post meridiem (am / pm)

A

a

53
Q

Uppercase Ante meridiem and Post meridiem (AM / PM)

A

A

54
Q

Swatch Internet time (000 - 999)

A

B

55
Q

12-hour format of an hour without leading zeros (1 - 12)

A

g

56
Q

24-hour format of an hour without leading zeros (0 - 23)

A

G

57
Q

12-hour format of an hour with leading zeros (01 - 12)

A

h

58
Q

24-hour format of an hour with leading zeros (00 - 23)

A

H

59
Q

Minutes with leading zeros (00 - 59)

A

i

60
Q

Seconds, with leading zeros (0 - 59)

A

s

61
Q

Microseconds (e.g. 654321)

A

u

62
Q

Timezone identifier (e.g. UTC, GMT, Atlantic/Azores)

A

e

63
Q

Whether or not the date is in daylight saving time (0 /1)

A

I

64
Q

Difference to Greenwich time (GMT) in hours (e.g. +0200)

A

O

65
Q

Difference to Greenwich time (GMT) with colon between hours and minutes (e.g. +02:00)

A

P

66
Q

Timezone abbreviation (e.g. EST, MDT)

A

T

67
Q

Timezone offset in seconds. The offset for
timezones west of UTC is always negative, and for those east of UTC is always positive. (-43200 - 50400)

A

Z

68
Q

ISO 8601 date (e.g. 2004-02-12T15:19:21+00:00)

A

o

69
Q

RFC 2822 formatted date (e.g. hu, 21 Dec
2000 16:01:07 +0200)

A

r

70
Q

Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

A

U

71
Q

get the unix timestamp for a given date. (with strict notice)

A

mktime()

72
Q

parse any English textual datetime description into a Unix timestamp

A

strtotime()