Exam Bank: PHP Essentials Exam: Midterm Units 1-5: PHP Essentials # of Question: 15
1
Which of the following statements is/are true?
Arrays use elements and indexes to organize information.
An index can be the same in an array provided the element is different.
An Array index starts with 0 and ends with the total-1 number.
A and C
All of the above
2. Which of the following options can comment text in a PHP script?
Double-slashes
Double-star
Hash sign
A and C
All of the above
3. Which of the following statements is/are true?
$_SERVER["HTTP_USER_AGENT"] returns the IP address of the end user
$_SERVER['REMOTE_ADDR'] returns the name of the browser being used by the end user
$_SERVER["HTTP_REFERER"] returns the referrer URL
A and B
All of the above
4. Which of the following statements is/are true?
POST method has no limit on the amount of information that can be transferred.
GET method has no limit on the amount of information that can be transferred.
A Webpage using GET can be bookmarked.
A and C
All of the above
5. Which of the following options will print Hello Susan Smith, if the variables are declared
as:
$name = "Susan "; $surname = "Smith";
echo "Hello $name $surname";
echo 'Hello $name $surname';
print 'Hello $name $surname';
B and C
All of the above
6
Which of the following options reflects the correct declaration of a constant?
$"NAME" = "SUSAN SMITH"
1
Which of the following statements is/are true?
Arrays use elements and indexes to organize information.
An index can be the same in an array provided the element is different.
An Array index starts with 0 and ends with the total-1 number.
A and C
All of the above
2. Which of the following options can comment text in a PHP script?
Double-slashes
Double-star
Hash sign
A and C
All of the above
3. Which of the following statements is/are true?
$_SERVER["HTTP_USER_AGENT"] returns the IP address of the end user
$_SERVER['REMOTE_ADDR'] returns the name of the browser being used by the end user
$_SERVER["HTTP_REFERER"] returns the referrer URL
A and B
All of the above
4. Which of the following statements is/are true?
POST method has no limit on the amount of information that can be transferred.
GET method has no limit on the amount of information that can be transferred.
A Webpage using GET can be bookmarked.
A and C
All of the above
5. Which of the following options will print Hello Susan Smith, if the variables are declared
as:
$name = "Susan "; $surname = "Smith";
echo "Hello $name $surname";
echo 'Hello $name $surname';
print 'Hello $name $surname';
B and C
All of the above
6
Which of the following options reflects the correct declaration of a constant?
$"NAME" = "SUSAN SMITH"