PHP Error and Exception Handling Mcqs

Our collections of Multiple choice questions and answers focuses on study of PHP Error and Exception Handling. These questions are chosen from a collection of most authoritative and best reference books on PHP Language. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate PHP Error and Exception Handling Topic comprehensively.

5.
Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

Error_reporting = E_ALL

Error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR

Error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR

Error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR

7.
Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

Ignore_repeated_errors

Ignore_repeat_error

Repeatedly_ignore_error

Repeated_error_ignore

8.
Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

Define_variable()

Define_log_variable()

Log_variable()

Define_syslog_variable()

15.
Which one of the following is the right description for the method getMessage() ?

Returns the message if it is passed to the constructor

Returns the message if it is passed to the class

Returns the message if it is passed to the file

Returns the message if it is passed to the object

0Shares
0
Scroll to Top