Debugging in PHP
Debugging in PHP - Important Points
11. | What does the function debug_print_backtrace() do in PHP? |
---|
A. Displays the current stack trace
B. Displays the current error message
C. Displays a list of all variables in the current scope
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
12. | What is the purpose of the function assert() in PHP? |
---|
A. To stop the execution of the script on an error
B. To display errors in the browser console
C. To log errors to a file or database
D. To test if a condition is true and trigger an error if it is not
View Answer Discuss Work SpaceAnswer: option d
Explanation:
13. | What is the purpose of the function error_reporting() in PHP? |
---|
A. To turn off error reporting
B. To set the level of error reporting
C. To display all errors
D. To log errors to a file or database
View Answer Discuss Work SpaceAnswer: option b
Explanation:
14. | What does the function set_exception_handler() do in PHP? |
---|
A. Sets a custom function to handle uncaught exceptions
B. Sets a custom function to handle runtime errors
C. Sets a custom function to handle syntax errors
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
15. | 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: