Relational operators can only be used for numeric comparison.
The * arithmetic operator has higher precedence than the + operator.
Conversion between data types happens automatically when a variable is used in a context that requires a different data type.
Which of the following is not a pre-defined function for interacting with MySQL databases?
Cookies are stored on the server computer.
Which of the following can be used to compare strings?
d. all of the above
The quantifier +, when used in a regular expression, matches any number of the preceding pattern.
When is the body of an if statement executed?
a. when the specified condition is true
b. when the specified condition is not true
c. regardless of the specified condition
d. it depends on the body of the statement
The setcookie function can be called:
a. Anytime during script execution.
b. During the first statement of the script only.
c. Before any other XHTML is printed.
d. None of the above.
PHP variable names are case sensitive.
Which is not a character class in PHP?
Arrays must be indexed with which of the following data types?
a. integers only
b. either an integer or a string
c. an integer, string, or floating point number
d. either an integer or a floating point number
The statement $$inputName is:
a. referencing a variable whose name is equal to the value of $inputName.
b. defining an array named $inputName.
c. shorthand for typing $inputName twice.
d. A syntax error.
GET and POST data sent to a PHP script are accessible using the ________ and ________ superglobal arrays.
a. $GET, $POST
b. $GETDATA, $POSTDATA
c. $CLIENT, $SERVER
d. $_GET, $_POST
PHP script is never in the same file as XHTML script.
Function die never takes arguments.
The foreach statement is designed specifically for iterating over arrays.
The settype function only temporarily changes the type of a variable.
The regular expression a+ matches
a. the string a+
b. a string of one or more a's
c. a string of zero or more a's
d. a string with a + at the beginning
A cookie that lasts only until the browser is closed is called a ________ cookie.
1. What does PHP stand for?
Personal Hypertext Processor
PHP: Hypertext Preprocessor
Private Home Page
2. PHP server scripts are surrounded by delimiters, which?
3. How do you write "Hello World" in PHP
echo "Hello World";
4. All variables in PHP start with which symbol?
5. What is the correct way to end a PHP statement?
6. The PHP syntax is most similar to:
Perl and C
7. How do you get information from a form that is submitted using the "get" method?
8. When using the POST method, variables are displayed in the URL:
9. In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
10. Include files must have the file extension ".inc"
11. What is the correct way to include the file "time.inc" ?
<?php include:"time.inc"; ?>
<?php include file="time.inc"; ?>
<?php include "time.inc"; ?>
<!-- include file="time.inc" -->
12. What is the correct way to create a function in PHP?
13. What is the correct way to open the file "time.txt" as readable?
14. PHP allows you to send emails directly from a script
15. What is the correct way to connect to a MySQL database?
16. What is the correct way to add 1 to the $count variable?
17. What is a correct way to add a comment in PHP?
18. PHP can be run on Microsoft Windows IIS (Internet Information Server):
19. In PHP, the die() and exit() functions do the exact same thing.
20. Which one of these variables has an illegal name?
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Question 1: The answer is false.
Question 2: The answer is true.
Question 3: The answer is true.
Question 4: The answer is option B.
Question 5: The answer is false.
Question 6: The answer is option D.
Question 7: The answer is false....