Debugging in PHP
Debugging in PHP - Important Points
6. | What is the difference between the die() and exit() functions in PHP? |
---|
A. There is no difference, they are synonyms
B. die() displays an error message and exits the script, exit() does not display an error message
C. exit() displays an error message and exits the script, die() does not display an error message
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
7. | What does the function error_get_last() do in PHP? |
---|
A. Returns the last error that occurred in the script
B. Returns the last warning that occurred in the script
C. Returns the last notice that occurred in the script
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
8. | What is the purpose of the function error_log() in PHP? |
---|
A. To display errors in the browser console
B. To log errors to a file or database
C. To stop the execution of the script on an error
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
9. | What is the purpose of the function set_error_handler() in PHP? |
---|
A. To turn off error reporting
B. To set the level of error reporting
C. To handle errors with a custom function
D. To stop the execution of the script on an error
View Answer Discuss Work SpaceAnswer: option c
Explanation:
10. | What does the function trigger_error() do in PHP? |
---|
A. Triggers a runtime error
B. Triggers a syntax error
C. Triggers a logical error
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation: