PHP Quiz 3
The metacharacter, ____, specifies an anchor at the end of the line.
($)
The ____ quantifier specifies that zero or more of the preceding characters can match.
(*)
The ____ metacharacter is used to specify a range of values in a character class.
(-)
____ are special characters that define the pattern matching rules in a regular expression.
Metacharacters
The escape sequence to insert a carriage return is ____.
\r
In a regular expression, a(n) ____ specifies that the pattern must appear at that position in the string.
anchor
The escape sequence \\ inserts a(n) ____.
backslash
In PHP, the escape character is the ____.
backslash(\)
A structure in which variables are placed within curly braces inside of a string is called a ____.
complex string syntax
The ____ function splits a string into an indexed array.
explode()
All text strings must begin and end with double quotation marks.
false
Metacharacters that specify the quantity of a match qualifiers.
false
The function substr_count() returns the total number of characters in a string.
false
The str_word_count() function returns the number of digits in a string.
false
The strpos() function performs a case-sensitive search for specified characters in a string and returns the position of the first occurrence of a substring within a string.
false
The ____ function uses a strong encryption algorithm called Message-Digest Algorithm to create a one-way hash of an entered string.
md()5
The strlen() function returns the total ____ in a string.
number of characters
The ____ function converts all of the letters in a string to capital letters.
strtoupper()
The ____ function will remove both leading and trailing spaces from a string.
trim()
Placing a backslash in front of an apostrophe tells the PHP scripting engine that the apostrophe is to be treated as a regular keyboard character.
true
Regular expressions are patterns that are used for matching and manipulating strings according to specified rules.
true
The escape character combined with one or more other characters is called an escape sequence.
true
The opposite of the explode() function is the implode() function.
true
To insert a horizontal tab, use the escape sequence \t.
true