PHP Exam 2 Questions and Answers
As you ________________ an application, you try to make it fail. - Answer-test
When you test an application, you start by using ________________ data. - Answer-valid
A/an ________________ error violates the rules for how PHP statements must be written. - Answer-
syntax
A simple way to trace the execution of an application is to insert ________________ statements at
appropriate points within the code. - Answer-echo
When a breakpoint is reached while you're testing an application with NetBeans, you can view the
values of the available ________________. - Answer-variables
When you're using NetBeans, you can step through the execution of an application one statement at a
time by clicking on the Step ________________ button. - Answer-into
The list of functions in the reverse order in which they were called is called a/an - Answer-stack trace
The goal of testing is to - Answer-find all errors in the application
,An error that lets the application run but produces the wrong results is known as a - Answer-logic error
The type of error that does not violate syntax rules, but causes the PHP interpreter to display errors is
called a - Answer-runtime error
What would be considered a common syntax error in PHP? - Answer-misspelling keywords, forgetting to
end a statement with a semicolon, forgetting a closing quotation mark
When you click on the Continue button while you're debugging with NetBeans, the application -
Answer-runs to the next breakpoint
Which of the following lists the functions in the reverse order in which they were called? - Answer-stack
trace
When debugging an application, you can set a(n) ________________ to view the value of a variable at a
particular point. - Answer-breakpoint
Which type of error is often most difficult to find and fix? - Answer-logic
When you test an application with NetBeans and a breakpoint is reached, you can click - Answer-the
Step Into button to execute the current statement and move to the next statement
What is the goal of testing an application before it is put into production? - Answer-find all errors
What is the goal of debugging an application before it is put into production? - Answer-fix all errors
, Which type of error does not violate the rules for how PHP statements must be written but will cause
the PHP interpreter to display errors? - Answer-runtime
Which type of error is considered the easiest to find? - Answer-syntax
Which type of error is considered the easiest to fix? - Answer-syntax
HTML ________________ tags are used to define the text boxes, password boxes, radio buttons, and
check boxes on a form. - Answer-<input>
In a/an ________________ list, only one option can be selected. - Answer-drop-down
A/an ________________ is similar to a text field, but it can display multiple lines of text. - Answer-test
area
If a form uses the ________________ method, the data for the fields is displayed in the URL. - Answer-
GET
To test whether a check box has been checked, you can use the ________________ function. - Answer-
isset()
Typically, you would use the ________________ method if a form contains password fields or other
sensitive data that you don't want to display in the URL. - Answer-POST
The htmlspecialchars() function can be used to convert some of the special characters that a user has
entered into a text box or text area into HTML character ________________. This provides a way to
display special characters and helps to guard against XSS attacks. - Answer-entities
As you ________________ an application, you try to make it fail. - Answer-test
When you test an application, you start by using ________________ data. - Answer-valid
A/an ________________ error violates the rules for how PHP statements must be written. - Answer-
syntax
A simple way to trace the execution of an application is to insert ________________ statements at
appropriate points within the code. - Answer-echo
When a breakpoint is reached while you're testing an application with NetBeans, you can view the
values of the available ________________. - Answer-variables
When you're using NetBeans, you can step through the execution of an application one statement at a
time by clicking on the Step ________________ button. - Answer-into
The list of functions in the reverse order in which they were called is called a/an - Answer-stack trace
The goal of testing is to - Answer-find all errors in the application
,An error that lets the application run but produces the wrong results is known as a - Answer-logic error
The type of error that does not violate syntax rules, but causes the PHP interpreter to display errors is
called a - Answer-runtime error
What would be considered a common syntax error in PHP? - Answer-misspelling keywords, forgetting to
end a statement with a semicolon, forgetting a closing quotation mark
When you click on the Continue button while you're debugging with NetBeans, the application -
Answer-runs to the next breakpoint
Which of the following lists the functions in the reverse order in which they were called? - Answer-stack
trace
When debugging an application, you can set a(n) ________________ to view the value of a variable at a
particular point. - Answer-breakpoint
Which type of error is often most difficult to find and fix? - Answer-logic
When you test an application with NetBeans and a breakpoint is reached, you can click - Answer-the
Step Into button to execute the current statement and move to the next statement
What is the goal of testing an application before it is put into production? - Answer-find all errors
What is the goal of debugging an application before it is put into production? - Answer-fix all errors
, Which type of error does not violate the rules for how PHP statements must be written but will cause
the PHP interpreter to display errors? - Answer-runtime
Which type of error is considered the easiest to find? - Answer-syntax
Which type of error is considered the easiest to fix? - Answer-syntax
HTML ________________ tags are used to define the text boxes, password boxes, radio buttons, and
check boxes on a form. - Answer-<input>
In a/an ________________ list, only one option can be selected. - Answer-drop-down
A/an ________________ is similar to a text field, but it can display multiple lines of text. - Answer-test
area
If a form uses the ________________ method, the data for the fields is displayed in the URL. - Answer-
GET
To test whether a check box has been checked, you can use the ________________ function. - Answer-
isset()
Typically, you would use the ________________ method if a form contains password fields or other
sensitive data that you don't want to display in the URL. - Answer-POST
The htmlspecialchars() function can be used to convert some of the special characters that a user has
entered into a text box or text area into HTML character ________________. This provides a way to
display special characters and helps to guard against XSS attacks. - Answer-entities